Closed tuffer020 closed 7 years ago
Hello! Thanks for letting me know!! Actually, it seems that I used Theano backend while training and haven't converted weight for TF.
The simplest solution is just to change keras backend from TF to Theano. I'll convert and update the weights later. Thank you!
Hi, yes, that did half of the trick :) I needed to add some configs since my environment wasn't setup properly.
For reference/documentation purposes, I am adding the following config file content.
If you run Keras on your machine, the config file gets created (or you can create it yourself) located at ~/.keras/keras.json
. Make sure to
change backend
"image_dim_ordering":"th"
dim_ordering='th'
in Convolution2D (located in multilayer.py)
{
"epsilon": 1e-07,
"floatx": "float32",
"image_data_format": "channels_last",
"backend": "theano",
"image_dim_ordering": "th"
}
Ref: https://github.com/yanpanlau/Keras-FlappyBird/issues/3
Thank you!
Hello again,
Is the model_build specifications for
multilayer.py
and the weights provided for it different?I am getting this error:
ValueError: Dimension 0 in both shapes must be equal, but are 5 and 128 for 'Assign' (op: 'Assign') with input shapes: [5,1,1,128], [128,1,5,1].
Which would suggest they are. Since this is a model building error (from the tensorflow backend), I can only guess that the weights and the model they're being passed into are different.
I tried running my own model, but the accuracy returned did not seem to improve after 10 epochs.
Thanks again!