TimeDistributed wrapper to process a set of images grouped together in one tensor. The goal is to have the model predict a cummulative maximum, similar to a majority vote prediction.TimeDistributed wrapper outputs the softmax layers for the shared CNN-stacks. The wrapper's output shape is (None, 5, 10). My intention was to merge this layer along the 1st axis to get the desired cummulated results with an expected shape of (None, 10).inp = Input(shape=(5, 1, 40, 40))
# ===== frequency filter =====
cnn = TimeDistributed(Convolution2D(16,3,3, border_mode='same', activation="relu"))(inp)
cnn = TimeDistributed(MaxPooling2D(pool_size=(2,2))(cnn)
cnn = TimeDistributed(Convolution2D(32,3,3, border_mode='same', activation="relu"))(cnn)
cnn = TimeDistributed(MaxPooling2D(pool_size=(2,2))(cnn)
cnn = TimeDistributed(Convolution2D(64, 3, 3, border_mode='same', activation="relu"))(cnn)
cnn = TimeDistributed(MaxPooling2D(pool_size=(2,2)))(cnn)
cnn = TimeDistributed(Flatten())(cnn)
cnn = TimeDistributed(Dense(512, activation="relu"))(cnn)
cnn = TimeDistributed(Dense(10, activation='softmax'))(cnn)
# output shape of cnn == (None, 5, 10)
mean = merge(cnn, mode='average', concat_axis=0) # <= this fails
model = Model(input=inp, output=mean)
# expected output shape of mode == (None, 10)
TypeError: TensorType does not support iteration. Maybe you are using builtin.sum instead of theano.tensor.sum? (Maybe .max?)--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/0782a1df-69bc-4187-8401-3d9478fc88d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.