Ich habe versucht, die Keras Bild-Dim-Reihenfolge von Tensorflow Reihenfolge in Theano Reihenfolge zu ändern. Ich änderte ~/.keras/keras.json
Datei, die Linie "image_dim_ordering": "th"
funktioniert nicht, aber die Linie "backend": "theano"
Konfiguration funktioniert.keras "image_dim_ordering" Konfiguration funktioniert nicht
{
"floatx": "float32",
"epsilon": 1e-07,
"backend": "theano",
"image_dim_ordering": "th"
}
Und wenn ich backend.image_dim_ordering('th')
am Anfang des Programms hinzufügen, gibt es eine neue Ausgabe in Zuladungsgewichte. Ich bin mir sicher, dass das Gewicht das "theano" Backend verwendet, und zwar in "th" Reihenfolge.
ValueError: Layer weight shape (3,3,3,64) not compatible with provided weight shape(64,3,3,3)
ursprünglichen Fehler ohne backend.image_dim_ordering('th')
am Anfang des Programms:
Exception: Layer weight shape (3, 3, 640, 64) not compatible with provided weight shape (64, 3, 3, 3)
ich verwende Python 2.7.12 tritt das Problem sowohl in win7 und Ubuntu 16.04-System.
Verwenden Sie Keras 2.0 API? wenn ja, dann wird "image_dim_ordering" durch "image_data_format" ersetzt. Siehe [hier] (https://keras.io/backend/). –
danke, das hilft sehr. – patric
Hat das dein Problem gelöst? –