nitishsrivastava / deepnet

Implementation of some deep learning algorithms.
BSD 3-Clause "New" or "Revised" License
893 stars 438 forks source link

About example of ae error #46

Closed jackiechensuper closed 10 years ago

jackiechensuper commented 10 years ago

Hi nitish, This is the error that when I ran the ae met, could you help me with that, many thanks!

Autoencoder 1 Train Step: 0Traceback (most recent call last): File "../../trainer.py", line 60, in main() File "../../trainer.py", line 54, in main model.Train() File "/home/hchen/deepnet/deepnet/neuralnet.py", line 632, in Train losses = self.TrainOneBatch(step) File "/home/hchen/deepnet/deepnet/neuralnet.py", line 330, in TrainOneBatch losses2 = self.BackwardPropagate(step) File "/home/hchen/deepnet/deepnet/neuralnet.py", line 316, in BackwardPropagate loss = self.ComputeDown(node, step) File "/home/hchen/deepnet/deepnet/neuralnet.py", line 234, in ComputeDown self.UpdateLayerParams(layer, step) File "/home/hchen/deepnet/deepnet/neuralnet.py", line 291, in UpdateLayerParams layer.Update('bias', step, no_reg=True) # By default, do not regularize bias. File "/home/hchen/deepnet/deepnet/parameter.py", line 84, in Update w = self.params[param_name] # Parameter to be updated. KeyError: 'bias'

nitishsrivastava commented 10 years ago

Fixed in latest commit. Thanks for pointing this out.

jackiechensuper commented 10 years ago

Dear Dr.Nitish, I have implemented an pretrained Auto-eocoder neural network based on your code, When I done the training, I got the trained weight and bias, but how can I get the predictions when testing on a different new image using the above weights? (just one feed forward calculation and got the prediction of final layer) Do you have a sample example? (sorry for my naive question since there are so many parameters and a explaining document would help a lot !) Many thanks Hao

nitishsrivastava commented 10 years ago

Take a look at https://github.com/nitishsrivastava/deepnet/blob/master/deepnet/extract_neural_net_representation.py.

jackiechensuper commented 10 years ago

Got it, many thanks!