benanne / morb Goto Github PK
View Code? Open in Web Editor NEWModular Restricted Boltzmann Machine (RBM) implementation using Theano
License: GNU General Public License v3.0
Modular Restricted Boltzmann Machine (RBM) implementation using Theano
License: GNU General Public License v3.0
I can't figure out how to correct this error:
ValueError: the batch size in the image (2) at run time is different than at build time (10) for the ConvOp.
Apply node that caused the error: ConvOp{('imshp', (1, 28, 28)),('kshp', (28, 28)),('nkern', 50),('bsize', 10),('dx', 1),('dy', 1),('out_mode', 'valid'),('unroll_batch', 5),('unroll_kern', 2),('unroll_patch', False),('imshp_logical', (1, 28, 28)),('kshp_logical', (28, 28)),('kshp_logical_top_aligned', True)}(Subtensor{int64:int64:}.0, Subtensor{::, ::, ::-1, ::-1}.0)
Inputs shapes: [(2, 1, 28, 28), (50, 1, 28, 28)]
Inputs strides: [(6272, 6272, 224, 8), (6272, 6272, -224, -8)]
I made mb_size=1, and it works but i'd like to work with larger minibatches, so can you please help me out here?
Hi,
Thank you for your post,it helps me a lot.
I tried to train Guassianbinary RBM with my data,which consists of real number ranging from -100 to 100. But the value of MSE monitor keeps increasing. I konw the triaing of RBM uses free energy function to do backpropagation, so I want to ask if it is okay for value of MSE monitor to keep incresing while training.
Best,
Amos
The Monitor baseclass doesn't do anything useful - monitors should just be Python functions that potentially take a StatsCollector and a Units instance as arguments. Should it turn out to be necessary to make them 'richer', then it's better to use annotations, which is more in line with Samplers and ActivationFunctions.
ImportError information:
File "D:mydir\example.py", line 1, in <module>
from morb import base, units, parameters, stats, updaters, trainers, monitors
File "D:mydir\morb\__init__.py", line 1, in <module>
import base
ImportError: No module named 'base'
ModuleNotFoundError information:
File "D:mydir\example.py", line 1, in <module>
from morb import base, units, parameters, stats, updaters, trainers, monitors
File "D:mydir\morb\__init__.py", line 7, in <module>
from .import updaters
File "D:mydir\morb\updaters.py", line 2, in <module>
import samplers
ModuleNotFoundError: No module named 'samplers'
First off, thanks for this awesome library! I'm new to DeepLearning and Theano, but your lib makes it so much easier.
I was wondering if there's a way to save (pickle) MORB models? I tried modifying example_basic.py
by adding the following lines at the end:
import cPickle
with open('model.pkl', 'wb') as f:
cPickle.dump(rbm, f, protocol=cPickle.HIGHEST_PROTOCOL)
but I get the following trace:
...
Epoch 49
MSE = 0.0026
Took 6.69 seconds
Traceback (most recent call last):
File "example_basic.py", line 61, in <module>
cPickle.dump(rbm, f, protocol=cPickle.HIGHEST_PROTOCOL)
cPickle.PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
If I remove the protocol=cPickle.HIGHEST_PROTOCOL
argument I get:
Epoch 49
MSE = 0.0026
Took 6.96 seconds
Traceback (most recent call last):
File "example_basic.py", line 61, in <module>
cPickle.dump(rbm, f)
File "/<removed path for privacy>/python2.7/copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects
Is there another way to save MORB models for later use?
Thanks,
Jorge
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.