Comments (5)
@Darwin2011 I think (ph_mean[i] * input[j] - nh_means[i] * nv_samples[j]) is right. The weights gradient should be data-modelγ
from deeplearning.
@liulhdarks ,thanks
The following code shows that the different weight update method. Could you check the following link?
https://github.com/echen/restricted-boltzmann-machines/blob/master/rbm.py
from deeplearning.
@Darwin2011 https://github.com/echen/restricted-boltzmann-machines/blob/master/rbm.py doesn't use the visible layer after sampling when updating weights. You can refer to the follow ML frameworks.
- [Deeplearning4j] https://github.com/agibsonccc/java-deeplearning/blob/master/deeplearning4j-core/src/main/java/org/deeplearning4j/models/featuredetectors/rbm/RBM.java
INDArray wGradient = input.transpose().mmul(probHidden.getSecond()).sub(
nvSamples.transpose().mmul(nhMeans));
- [darks-learning] https://github.com/liulhdarks/darks-learning/blob/master/src/main/java/darks/learning/neuron/rbm/RBM.java
DoubleMatrix wGradient = input.transpose().mmul(hProp1.prob)
.sub(vPropn.sample.transpose().mmul(hPropn.prob));
Hope to help you!
from deeplearning.
@liulhdarks thanks for your kind help. I will follow your guide.
Best Regards
from deeplearning.
@liulhdarks @yusugomori
I think the update for W , a , b should as follows:
self.W += lr * (numpy.dot(self.input.T, ph_mean - numpy.dot(nv_samples.T, nh_means))
self.vbias += lr * numpy.mean(self.input - nv_samples, axis=0)
self.hbias += lr * numpy.mean(ph_mean - nh_means, axis=0)
In origin python RBM.py. , self.W and self.hbias is not correct. This problem is also in C/C++ files, but the W has been fixed.
If I am not right, please inform me.
Thanks.
from deeplearning.
Related Issues (20)
- About The SDA weights update problem : Parameter update formulas can I use Gauss-Newton method, specifically how to achieve with python,thabk you
- Over fitting in Stacked Denoising Autoencoders HOT 1
- About Finetune
- why not add makefile for c,cpp for ubuntu(or other linux)? HOT 2
- dbn.pretraining generates W with nan
- DBN_finetune: layer_input used before set
- A Problem with the Deep Belief Network C++ codes HOT 4
- ImportError: No module named logistic_sgd
- what about the license? HOT 1
- Quension about the updation of weight matrix. HOT 1
- Is there this type of deep learning model?
- Can I save the model from training?
- CDBN, Dataset with size of 8000 run into failure
- Debug mode of DBN C++ code leads to equal results HOT 1
- license? HOT 2
- How to evaluate the DBN (Scala) model? HOT 1
- maybe a error
- Hope CDBN is coming soon! HOT 2
- Could I use this in my Android project?
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 deeplearning.