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)
- 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
- Custom early stop callback HOT 12
- SCD isn't stochastic and perhaps should be called CD? HOT 2
- 2.20 documentation + link issues
- Which optimizer should I use? HOT 2
- [PowerPC] Bus error during running tests: `KERN_PROTECTION_FAILURE at address: 0x00000000` HOT 7
- [aarch64] One test failure in Johnson844LovaszThetaFMatSDP HOT 8
- benchmarking framework for single-objective evolutionary optimization algorithms HOT 1
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.