-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something wrong with output_shape in merge layer #2855
Comments
There was an issue with the There is another issue with your snippet: you are sharing a BatchNormalization layer, which is impossible. As a fix, you could use |
Your snippet works with me after the latest fix (and changing the BatchNorm mode to 2). |
thanks! 2016年5月31日火曜日、François [email protected]さんは書きました:
|
91b9302 fixed the issue, but another issue occurs 😢 sample code: https://gist.github.com/henry0312/0007239173035d8bc5725647a2f2a552 Then:
|
Maybe, this will fix. diff --git a/keras/engine/topology.py b/keras/engine/topology.py
index a5e147d..82bed08 100644
--- a/keras/engine/topology.py
+++ b/keras/engine/topology.py
@@ -1279,7 +1279,7 @@ class Merge(Layer):
output_shape = self._output_shape(input_shape)
return output_shape
elif self._output_shape is not None:
- return (input_shape[0],) + self._output_shape
+ return (input_shape[0],) + tuple(self._output_shape)
else:
# TODO: consider shape auto-inference with TF
raise Exception('The Merge layer ' + self.name + |
Right. I fixed it. This is because JSON deserialization converts all tuples to lists. |
I see. Thank you! |
Sample code: https://gist.github.com/henry0312/9c1aee0a4330c860ff7b2bb139acbb15
Run:
python gistfile1.py
Then:
The text was updated successfully, but these errors were encountered: