{"action":"created","issue":{"url":"https://api.github.com/repos/anayebi/keras-extra/issues/1","labels_url":"https://api.github.com/repos/anayebi/keras-extra/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/anayebi/keras-extra/issues/1/comments","events_url":"https://api.github.com/repos/anayebi/keras-extra/issues/1/events","html_url":"https://github.com/anayebi/keras-extra/issues/1","id":112940580,"number":1,"title":"can you give me an  example for cnn connect with LSTM","user":{"login":"1461190388","id":8957134,"avatar_url":"https://avatars.githubusercontent.com/u/8957134?v=3","gravatar_id":"","url":"https://api.github.com/users/1461190388","html_url":"https://github.com/1461190388","followers_url":"https://api.github.com/users/1461190388/followers","following_url":"https://api.github.com/users/1461190388/following{/other_user}","gists_url":"https://api.github.com/users/1461190388/gists{/gist_id}","starred_url":"https://api.github.com/users/1461190388/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1461190388/subscriptions","organizations_url":"https://api.github.com/users/1461190388/orgs","repos_url":"https://api.github.com/users/1461190388/repos","events_url":"https://api.github.com/users/1461190388/events{/privacy}","received_events_url":"https://api.github.com/users/1461190388/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-23T03:23:56Z","updated_at":"2015-10-23T03:31:55Z","closed_at":null,"body":"@anayebi "},"comment":{"url":"https://api.github.com/repos/anayebi/keras-extra/issues/comments/150449772","html_url":"https://github.com/anayebi/keras-extra/issues/1#issuecomment-150449772","issue_url":"https://api.github.com/repos/anayebi/keras-extra/issues/1","id":150449772,"user":{"login":"anayebi","id":12835914,"avatar_url":"https://avatars.githubusercontent.com/u/12835914?v=3","gravatar_id":"","url":"https://api.github.com/users/anayebi","html_url":"https://github.com/anayebi","followers_url":"https://api.github.com/users/anayebi/followers","following_url":"https://api.github.com/users/anayebi/following{/other_user}","gists_url":"https://api.github.com/users/anayebi/gists{/gist_id}","starred_url":"https://api.github.com/users/anayebi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anayebi/subscriptions","organizations_url":"https://api.github.com/users/anayebi/orgs","repos_url":"https://api.github.com/users/anayebi/repos","events_url":"https://api.github.com/users/anayebi/events{/privacy}","received_events_url":"https://api.github.com/users/anayebi/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T03:31:55Z","updated_at":"2015-10-23T03:31:55Z","body":"Happy to help! Usually, I connect the two using my TimeDistributedConvolution2D layer in keras.layers.extra rather than the Convolution2D layer. So, here is an example (I have noted the layers that are only in keras.layers.extra):\r\n\r\nmodel.add(TimeDistributedConvolution2D(16, 40, 9, 9, border_mode='full')) #note this is only in keras.layers.extra\r\n\tmodel.add(Activation('relu'))\r\n\tmodel.add(TimeDistributedMaxPooling2D(poolsize=(2, 2), ignore_border=True)) #note this is only in keras.layers.extra\r\n\tmodel.add(TimeDistributedFlatten()) #note this is only in keras.layers.extra\r\n\tmodel.add(TimeDistributedDense(6400, 32, init=init_method, W_regularizer=l1(reg)))\r\n\tmodel.add(Activation('relu'))\r\n\tmodel.add(LSTM(32, 32, forget_bias_init='one', return_sequences=True))\r\n\r\nSo basically, this is a convolutional network followed by max pooling (which also has to be distributed across time), followed by flattening (again across time), which then gets fed into a dense layer that feeds to an LSTM."}}