Issue 1:
I am using TimeDistributedMerge to merge outputs from lstm over time by returning sequences, since TimeDistributedMerge is deprecated, so I changed my implementation to use timedistributed wrapper then it gives error.

File "/Library/Python/2.7/site-packages/keras/engine/topology.py", line 148, in create_node

output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))

File "/Library/Python/2.7/site-packages/keras/layers/wrappers.py", line 131, in call

y = self.layer.call(X) # (nb_samples * timesteps, ...)

File "/Library/Python/2.7/site-packages/keras/engine/topology.py", line 1189, in call

'(at least 2). Got: ' + str(inputs))

Exception: Merge must be called on a list of tensors (at least 2). Got: Reshape{2}.0

My code

model = Sequential()

model.add(Embedding(max_features, 128, input_length=chunk_size, dropout=0.5))

model.add(LSTM(128, dropout_W=0.5, dropout_U=0.1,return_sequences=True))

model.add(TimeDistributed(Merge(layers=None,mode='ave')))

model.add(Dense(num_classes))

model.add(Activation("softmax"))

@fchollet can you help me out with this by giving an example of how to use timedistributed wrapper for lstm return sequences

Issue 2:
I've got code that works in the keras-1 compatibility layer of keras-2, but fails when I use the new concatenate() API.

Key lines:

concat_axis = 1 if K.image_data_format() == 'channels_first' else -1

x_list = [x]

for i in range(nb_layers):
x = __conv_block(x, growth_rate, bottleneck,
dropout_rate, weight_decay)
x_list.append(x)

# commenting merge() and uncommenting concatenate() fails
x = merge(x_list, mode='concat', concat_axis=concat_axis)
# x = concatenate(x_list, concat_axis)

if grow_nb_filters:
nb_filter += growth_rate

if return_concat_list:
return x, nb_filter, x_list
else:
return x, nb_filter

Error:

Traceback (most recent call last):
File "/Users/athundt/source/keras-contrib/keras_contrib/applications/densenet.py", line 712, in <module>
dn = DenseNet()
File "/Users/athundt/source/keras-contrib/keras_contrib/applications/densenet.py", line 136, in DenseNet
model = Model(inputs, x, name='densenet')
File "/usr/local/lib/python2.7/site-packages/Keras-2.0.1-py2.7.egg/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/Keras-2.0.1-py2.7.egg/keras/engine/topology.py", line 1704, in __init__
str(layers_with_complete_input))
RuntimeError: Graph disconnected: cannot obtain value for tensor Tensor("conv2d_2/convolution:0", shape=(?, 32, 32, 12), dtype=float32) at layer "concatenate_1". The following previous layers were accessed without issue: ['input_1', 'initial_conv2D', 'batch_normalization_1', 'activation_1', 'conv2d_1']

The full code is in keras-team/keras-contrib@bf95474

Thank you!

Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps

If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.

Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).