coxlab / prednet

Code and models accompanying "Deep Predictive Coding Networks for Video Prediction and Unsupervised Learning"
https://arxiv.org/abs/1605.08104
MIT License
764 stars 260 forks source link

Extending prednet #28

Closed lengoanhcat closed 7 years ago

lengoanhcat commented 7 years ago

Hi,

I am currently trying to extend prednet by adding a few convolution layers beside ['i', 'f', 'c', 'o', 'a', 'ahat']. With tensorflow backend, I successfully train that model. However, when loading model (.json) and weights (.hdf5), I face a following errors:

ValueError: Layer #0 (named "prednet_1" in the current model) was found to correspond to layer prednet_1                                                                                                            
in the save file. However the new layer prednet_1 expects 46 weights, but the saved weights have 62 eleme                                                                                                           
nts.

It seems there is an incoherence between number of weights in model file (.json) and actual weights (.hdf5). Any idea how can I fix it ? Appreciate any thoughts.

I have uploaded the code and trained model here https://github.com/lengoanhcat/prednet_alstm. When expspace_evaluate_alstm.py is run, you can see the mentioned error.

Regards,

Cat Le

lengoanhcat commented 7 years ago

Just a silly mistake. I have figured it out myself.