title: Error with CNN + RNN "__init__() takes at least 4 arguments (4 given)"
body: <p>I recently took a tutorial about Deep learning and I am now trying to creat one by myself. The Idea is to take a video, split it in single frames and feed it through an Neural Network. Because it is jpg i though of an CNN. But I don't categorize this picture, furthermore i wanted to get float values. Thats why i though using an RNN. I found a libary for Keras which support this: But at this point I stuck. (Running on Python 2.7)</p>
  
  <p>Error Message:</p>
  
  <pre><code>runfile('/Users/tobias/anaconda3/envs/opencv/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py', wdir='/Users/tobias/anaconda3/envs/opencv/lib/python2.7/site-packages/spyder/utils/site')
  
  runfile('/Users/tobias/Desktop/Projekt/Speed_ANN.py', wdir='/Users/tobias/Desktop/Projekt')
  Traceback (most recent call last):
  
    File "&lt;ipython-input-14-b3a54cae7fa1&gt;", line 1, in &lt;module&gt;
      runfile('/Users/tobias/Desktop/Projekt/Speed_ANN.py', wdir='/Users/tobias/Desktop/Projekt')
  
    File "/Users/tobias/anaconda3/envs/opencv/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 880, in runfile
      execfile(filename, namespace)
  
    File "/Users/tobias/anaconda3/envs/opencv/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
      builtins.execfile(filename, *where)
  
    File "/Users/tobias/Desktop/Projekt/Speed_ANN.py", line 38, in &lt;module&gt;
      classifier.add(TimeDistributedConvolution2D(32,(3,3),input_shape = (64, 64, 3),activation = 'relu'))
  
  TypeError: __init__() takes at least 4 arguments (4 given)
  </code></pre>
  
  <p>I have 4 arguments ? Did i put something wrong in?</p>
  
  <p>This is my code: Do you need the kera-extra.py aswell? This is the library I added  </p>
  
  <pre><code>"""
  Creator: Tobias
  Date: 15.05.17
  """
  #Initialising video preprocessing
  import cv2
  import numpy as np
  import pandas as pd
  
  #Initialising all Libarys for Deep Learning
  from keras.models import Sequential
  from keras.layers import Flatten
  from keras.layers import Dense
  from keras.layers.extra import TimeDistributedConvolution2D
  from keras.layers.extra import TimeDistributedFlatten
  from keras.layers.extra import TimeDistributedMaxPooling2D
  """
  #Loading .txt with speed values
  speed_values = pd.read_csv('data/train.txt')
  
  #Loading Video in Python
  video = cv2.VideoCapture('data/train.mp4')
  success,image = video.read()
  count = 0
  success = True
  #Splitting video in single images in jpg
  while success:
      success,image = video.read()
      #cv2.imwrite('data/video_jpg/',speed_values[success],'.jpg')
      cv2.imwrite("data/video_jpg/%f.jpg" %speed_values.iloc[count,:].values,image) 
      count += 1 
  print('Video Succefully Converted to jpg')
  """
  
  
  classifier = Sequential()
  # Initialising the CNN and building CNN
  classifier.add(TimeDistributedConvolution2D(32,(3,3),input_shape = (64, 64, 3),activation = 'relu'))
  classifier.add(TimeDistributedConvolution2D(16, 3, 3, border_mode='valid',activation = 'relu'))
  classifier.add(Flatten())
  classifier.add(Dense(units = 128, activation = 'relu'))
  classifier.compile(optimizer = 'adam', loss = 'mean_squared_error',metrics = ['accuracy'])
  
  #Preprocessing the video data for CNN part 2
  
  from keras.preprocessing.image import ImageDataGenerator
  
  train_datagen = ImageDataGenerator(rescale = 1./255,
                                     shear_range = 0.2,
                                     zoom_range = 0.2,
                                     horizontal_flip = True)
  
  test_datagen = ImageDataGenerator(rescale = 1./255)
  
  training_set = train_datagen.flow_from_directory('data/training/train_data',
                                                   target_size = (64, 64),
                                                   batch_size = 32,
                                                   class_mode = 'binary')
  
  test_set = test_datagen.flow_from_directory('data/training/test_data',
                                              target_size = (64, 64),
                                              batch_size = 32,
                                              class_mode = 'binary')
  
  classifier.fit_generator(training_set,
                           steps_per_epoch = 8000,
                           epochs = 5,
                           validation_data = test_set,
                           validation_steps = 2000)
  </code></pre>
  
  <p>//EDIT 
  @JohanL
  I changed it as you suggested but it still have an error even it has all arguments it need.</p>
  
  <pre><code>classifier = Sequential()
  # Initialising the CNN and building CNN
  classifier.add(TimeDistributedConvolution2D(32,3,3,input_shape = (64, 64, 3),activation = 'relu'))
  </code></pre>
  
  <p>Now it gives me: Doing it with standart CNN works so maybe something wrong in the keras.extra library?</p>
  
  <pre><code>classifier = Sequential()
  # Initialising the CNN and building CNN
  classifier.add(TimeDistributedConvolution2D(32,3,3,input_shape = (64, 64, 3),activation = 'relu'))
  Traceback (most recent call last):
  
  
  
    File "&lt;ipython-input-20-085e686ea1fc&gt;", line 3, in &lt;module&gt;
      classifier.add(TimeDistributedConvolution2D(32,3,3,input_shape = (64, 64, 3),activation = 'relu'))
  
    File "/Users/tobias/anaconda3/envs/opencv/lib/python2.7/site-packages/keras/models.py", line 433, in add
      layer(x)
  
    File "/Users/tobias/anaconda3/envs/opencv/lib/python2.7/site-packages/keras/engine/topology.py", line 558, in __call__
      self.build(input_shapes[0])
  
  TypeError: build() takes exactly 1 argument (2 given)
  </code></pre>