{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/2579","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/2579/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/2579/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/2579/events","html_url":"https://github.com/fchollet/keras/issues/2579","id":152525814,"number":2579,"title":"Keras output shape is different for versions 0.3.2 -> 1.0.1","user":{"login":"prinsherbert","id":7011110,"avatar_url":"https://avatars.githubusercontent.com/u/7011110?v=3","gravatar_id":"","url":"https://api.github.com/users/prinsherbert","html_url":"https://github.com/prinsherbert","followers_url":"https://api.github.com/users/prinsherbert/followers","following_url":"https://api.github.com/users/prinsherbert/following{/other_user}","gists_url":"https://api.github.com/users/prinsherbert/gists{/gist_id}","starred_url":"https://api.github.com/users/prinsherbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prinsherbert/subscriptions","organizations_url":"https://api.github.com/users/prinsherbert/orgs","repos_url":"https://api.github.com/users/prinsherbert/repos","events_url":"https://api.github.com/users/prinsherbert/events{/privacy}","received_events_url":"https://api.github.com/users/prinsherbert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-02T10:12:38Z","updated_at":"2016-05-03T15:29:35Z","closed_at":null,"body":"I found some of my personal tests failing after upgrading from 0.3.2 to 1.0.1 (0.3.3 als didn't work, but I did not investigate that).\r\n\r\nThe problem is that when I train a model with inputs of shape (100, N0), (100, N1), ... etc I would expect an output of (100, Nout), yet I get an output of shape (Nout). This is illustrated by this minimal working example (using version 1.0.1):\r\n\r\n    import keras\r\n    from keras.models import Graph\r\n    from keras.layers import Dense\r\n    import numpy\r\n\r\n    N_continuous = 10\r\n    N_categorical = 5\r\n    N_output = 2\r\n\r\n    categorical = (numpy.random.randn(100,N_categorical) > 0).astype(numpy.float32)\r\n    continuous  = numpy.random.randn(100,N_continuous)\r\n    output      = numpy.random.randn(100, N_output)\r\n\r\n    graph = Graph()\r\n\r\n    graph.add_input(name='continuous', input_shape=(N_continuous, ))\r\n    graph.add_node(Dense(N_output, activation='linear'), name='linear_models', input='continuous')\r\n\r\n    graph.add_output(name='regression_output', input='linear_models')\r\n\r\n    graph.compile(optimizer='rmsprop', loss={'regression_output': 'mse'})\r\n\r\n    graph.fit(data={'continuous': continuous, 'categorical': categorical, 'regression_output': output}, nb_epoch=1)\r\n    print( graph.predict({\r\n        'continuous': continuous,\r\n        'categorical': categorical,\r\n        'regression_output': output\r\n    })['regression_output'].shape )\r\n\r\n    print(keras.__version__)\r\n\r\nThe output is `(2, )` for the shape and `1.0.1` for the `__version__`.\r\n\r\nIn version 0.3.2 the output shape is `(100, 2)`, which I would expect. Why are the shapes different for different versions? Which one is/ones are correct? Is my NN-architecture 'defective'?\r\n\r\nTheano has version `0.9.0dev0.dev-5e5e5cc5581a88ab425b9bd73b7719efbd10f6d3`\r\n\r\nThank you in advance!"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/216565999","html_url":"https://github.com/fchollet/keras/issues/2579#issuecomment-216565999","issue_url":"https://api.github.com/repos/fchollet/keras/issues/2579","id":216565999,"user":{"login":"bayesrule","id":3372671,"avatar_url":"https://avatars.githubusercontent.com/u/3372671?v=3","gravatar_id":"","url":"https://api.github.com/users/bayesrule","html_url":"https://github.com/bayesrule","followers_url":"https://api.github.com/users/bayesrule/followers","following_url":"https://api.github.com/users/bayesrule/following{/other_user}","gists_url":"https://api.github.com/users/bayesrule/gists{/gist_id}","starred_url":"https://api.github.com/users/bayesrule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bayesrule/subscriptions","organizations_url":"https://api.github.com/users/bayesrule/orgs","repos_url":"https://api.github.com/users/bayesrule/repos","events_url":"https://api.github.com/users/bayesrule/events{/privacy}","received_events_url":"https://api.github.com/users/bayesrule/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T15:29:35Z","updated_at":"2016-05-03T15:29:35Z","body":"@NasenSpray  any update on Theano/Theano/#4289 , still using your fork to avoid this problem =)"}}