Comments (5)
Hey there @SinghKislay, I think that this is not specific to ensmallen but instead mlpack. In any case, I'd suggest taking a careful look at src/mlpack/tests/feedforward_network_test.cpp
and src/mlpack/tests/convolutional_network_test.cpp
and related files to get an idea of how to build neural networks with mlpack. The strategy you described for building a network is pretty straightforward, but you don't need a special ResNet
struct---you can just build an FFN<>
and add the right layers.
from ensmallen.
Hi, @rcurtin I have read the examples from test/convolutional_network_test.cpp, model/kaggle/DigitRecogniser/src/DigitRecogniser.cpp I have also read the example from vae in model reository. All of them use Add() method to add the layer and then they just use Train() method with input and target. I understad this and have also built one. But what I want to do is modify the outputs of each layer which is not done in any of the examples. Could u you point me to an example Where the Feedforward() method is used so that I could do f(x)+x. I don't know why is this so hard am I missing something here. Thankyou
from ensmallen.
@SinghKislay Sorry for the slow response, in this case you have to manually step through each layer or implement a new one that you could add right after each layer you like to modify. Here is the code to get the output after each layer:
in this case network[begin + i].OutputParameter()
does contain the result. Let me know if I should clarify anything.
from ensmallen.
@zoq thanks for reply, I understand we have to add layers manually, which is why I made the resnet struct on top of ffn class. Where I am facing problem is propagating the gradients back and the loss function. Say I push the input all the way through to the last layer and then push it into the loss fuction. How do I backprop. All the examples that I saw regarding back prop were using simple train method which we can't use in this case.
from ensmallen.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍
from ensmallen.
Related Issues (20)
- Convert ensmallen from vcpkg to nuget and submit the package to nuget repository HOT 4
- [regression in 2.17.0] Tests aren't built HOT 2
- armadillo / bandicoot conv_to ambiguity HOT 6
- tests/catch.hpp update to anticipate failure to build with glibc 2.34 HOT 2
- C++20 redudant template argument disallowed in ctor HOT 4
- Debian build (test) failure on armel HOT 24
- Adam with Decay HOT 2
- Compiling errors ensmallen 02.18.02 using VS2019 armadillo.lib 10.08.02 and mlpack.lib 03.04.02 HOT 6
- The example to use the constrained function HOT 4
- AugLagrangian with constraints validation HOT 8
- Multi-objective functions both MOEA/D-DE and NSGA2 - Examples using SchafferFunctionN1 HOT 1
- Implementing Function Type for Partial Derivatives HOT 3
- Does ensmallen work with armadillo >=10.0? HOT 5
- Enable HTTPS on ensmallen.org HOT 1
- Debian build (test) failure on i386 HOT 7
- ProgressBar() does not work with L_BFGS HOT 3
- Bounds for search space HOT 5
- During AugLagrangian's optimization, L_BFGS sets coordinates to nan HOT 6
- Migrate from Catch v2 to v3 HOT 3
- Using optimizer with integers HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ensmallen.