Closed eelcovdw closed 7 years ago
Is your keras up-to-date ?
just updated all dependencies (keras recurrentshop seq2seq), the summaries give the same output.
I did notice that no errors pop up if I just use the expected output shape. Added this to the previous script:
from keras.optimizers import SGD
import numpy as np
model.compile(SGD(), ['categorical_crossentropy'])
x = np.random.random((64, 16, 32))
y = np.random.random((64, 16, 8))
print(model.train_on_batch(x, y))
Hi all,
I am not terribly experienced with Keras, and not sure if this is an actual issue or Keras quirk. When testing some things with the seq2seq models and functional API, I came across a (possibly) inconsistent output shape.
My code, a seq2seq model with timedistributed softmax
Printing the summaries, i get the following output:
Looking at the output_shape of the seq2seq model: in the first summary (just the s2s container), the output_shape of the last layer is as expected (None, 16, 32). However, when calling the model in with the functional API, the output_shape of the container is ((None, 32), 16, 32). Where are those parentheses and the 32 coming from?