keras-extra icon indicating copy to clipboard operation
keras-extra copied to clipboard

Issue with TimeDistributedConvolution2D

Open littonj97 opened this issue 8 years ago • 5 comments

n_hidden = 256 n_samples = 100 n_timesteps = 16

model = Sequential() model.add(TimeDistributedConvolution2D(32, 5, 5, border_mode='same', input_shape=(n_timesteps, 28, 28))) model.add(TimeDistributedMaxPooling2D(pool_size=(nb_pool, nb_pool))) model.add(Activation('relu')) model.add(TimeDistributedFlatten()) model.add(LSTM(256, return_sequences=True)) model.add(TimeDistributedDense(nb_classes)) model.add(Activation('softmax'))

the above code throws error as http://pastebin.com/E319wGeg

littonj97 avatar Aug 15 '16 15:08 littonj97

I am getting the following error when I also run the baove code: Using TensorFlow backend. Traceback (most recent call last): File "/usr/lib/pycharm-community/helpers/pydev/pydevd.py", line 1556, in globals = debugger.run(setup['file'], None, None, is_module) File "/usr/lib/pycharm-community/helpers/pydev/pydevd.py", line 940, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/home/oakkas/Desktop/autocar/handStateModel2.py", line 47, in model.add(extra.TimeDistributedConvolution2D(32, 5, 5, border_mode='same', input_shape=(None, n_timesteps, 3, 256, 256))) File "/usr/local/lib/python2.7/dist-packages/keras/layers/extra.py", line 89, in init self.input = K.placeholder(ndim=5) AttributeError: can't set attribute

oakkas avatar Sep 14 '16 19:09 oakkas

Same error here

amir-abdi avatar Feb 09 '17 22:02 amir-abdi

I have the same error. Is this the version problem?

a00achild1 avatar Feb 16 '17 13:02 a00achild1

My problem solved as I figured that keras already has TimeDistributed layers and we don't need these extra layers anymore.

On Feb 16, 2017, at 8:24 AM, David Chen [email protected] wrote:

I have the same error. Is this the version problem?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

amir-abdi avatar Feb 16 '17 13:02 amir-abdi

@amir-abdi thanks for your information, I'll give it a try!

a00achild1 avatar Feb 17 '17 02:02 a00achild1