{"action":"created","issue":{"url":"https://api.github.com/repos/kohpangwei/influence-release/issues/2","repository_url":"https://api.github.com/repos/kohpangwei/influence-release","labels_url":"https://api.github.com/repos/kohpangwei/influence-release/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/kohpangwei/influence-release/issues/2/comments","events_url":"https://api.github.com/repos/kohpangwei/influence-release/issues/2/events","html_url":"https://github.com/kohpangwei/influence-release/issues/2","id":251143137,"number":2,"title":"Crashes at keras.layers.Flatten for keras 2.0.6","user":{"login":"chiachun","id":4601316,"avatar_url":"https://avatars0.githubusercontent.com/u/4601316?v=4","gravatar_id":"","url":"https://api.github.com/users/chiachun","html_url":"https://github.com/chiachun","followers_url":"https://api.github.com/users/chiachun/followers","following_url":"https://api.github.com/users/chiachun/following{/other_user}","gists_url":"https://api.github.com/users/chiachun/gists{/gist_id}","starred_url":"https://api.github.com/users/chiachun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiachun/subscriptions","organizations_url":"https://api.github.com/users/chiachun/orgs","repos_url":"https://api.github.com/users/chiachun/repos","events_url":"https://api.github.com/users/chiachun/events{/privacy}","received_events_url":"https://api.github.com/users/chiachun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-18T05:27:09Z","updated_at":"2017-08-23T17:53:24Z","closed_at":null,"body":"**tensorflow version: 1.3.0\r\nrun_rbf_comparison.py crashes at keras.layers.Flatten with keras 2.0.6.\r\nFixed by switching to keras 2.0.0**\r\n\r\n**Suggestion: Please state the required version of keras (and other packages). Perhaps this information is available somewhere but I haven't found.**\r\n\r\nrun_rbf_comparison.py in <module>()\r\n    172     train_dir='output',\r\n    173     log_dir='log',\r\n--> 174     model_name=full_model_name)\r\n    175 train_inception_features_val = generate_inception_features(\r\n    176     full_model,\r\n\r\ninfluence/inceptionModel.py in __init__(self, img_side, num_channels, weight_decay, **kwargs)\r\n     39         self.num_features = 2048 # Hardcoded for inception. For some reason Flatten() doesn't register num_features.\r\n     40\r\n---> 41         super(BinaryInceptionModel, self).__init__(**kwargs)\r\n     42\r\n     43         self.load_inception_weights()\r\n\r\ninfluence/genericNeuralNet.pyc in __init__(self, **kwargs)\r\n    121             self.logits = self.inference(self.input_placeholder, self.labels_placeholder)\r\n    122         else:\r\n--> 123             self.logits = self.inference(self.input_placeholder)\r\n    124\r\n    125         self.total_loss, self.loss_no_reg, self.indiv_loss_no_reg = self.loss(\r\n\r\ninfluence/inceptionModel.py in inference(self, input)\r\n    168         pooled_inception_features = AveragePooling2D((8, 8), strides=(8, 8), name='avg_pool')(raw_inception_features)\r\n    169         print (pooled_inception_features)\r\n--> 170         self.inception_features = Flatten(name='flatten')(pooled_inception_features)\r\n    171\r\n    172\r\n\r\n......./virtualenv_folder/tensorflow/local/lib/python2.7/site-packages/keras/engine/topology.pyc in __call__(self, inputs, **kwargs)\r\n    613             # Infering the output shape is only relevant for Theano.\r\n    614             if all([s is not None for s in _to_list(input_shape)]):\r\n--> 615                 output_shape = self.compute_output_shape(input_shape)\r\n    616             else:\r\n    617                 if isinstance(input_shape, list):\r\n\r\n......./virtualenv_folder/tensorflow/local/lib/python2.7/site-packages/keras/layers/core.pyc in compute_output_shape(self, input_shape)\r\n    475             raise ValueError('The shape of the input to \"Flatten\" '\r\n    476                              'is not fully defined '\r\n--> 477                              '(got ' + str(input_shape[1:]) + '. '\r\n    478                              'Make sure to pass a complete \"input_shape\" '\r\n    479                              'or \"batch_input_shape\" argument to the first '\r\n\r\nValueError: The shape of the input to \"Flatten\" is not fully defined (got (None, None, 2048). Make sure to pass a complete \"input_shape\" or \"batch_input_shape\" argument to the first layer in your model.\r\n"},"comment":{"url":"https://api.github.com/repos/kohpangwei/influence-release/issues/comments/324412832","html_url":"https://github.com/kohpangwei/influence-release/issues/2#issuecomment-324412832","issue_url":"https://api.github.com/repos/kohpangwei/influence-release/issues/2","id":324412832,"user":{"login":"kohpangwei","id":1113199,"avatar_url":"https://avatars0.githubusercontent.com/u/1113199?v=4","gravatar_id":"","url":"https://api.github.com/users/kohpangwei","html_url":"https://github.com/kohpangwei","followers_url":"https://api.github.com/users/kohpangwei/followers","following_url":"https://api.github.com/users/kohpangwei/following{/other_user}","gists_url":"https://api.github.com/users/kohpangwei/gists{/gist_id}","starred_url":"https://api.github.com/users/kohpangwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohpangwei/subscriptions","organizations_url":"https://api.github.com/users/kohpangwei/orgs","repos_url":"https://api.github.com/users/kohpangwei/repos","events_url":"https://api.github.com/users/kohpangwei/events{/privacy}","received_events_url":"https://api.github.com/users/kohpangwei/received_events","type":"User","site_admin":false},"created_at":"2017-08-23T17:53:24Z","updated_at":"2017-08-23T17:53:24Z","body":"Thanks for finding this! The version information was implicitly in our Dockerfile (https://hub.docker.com/r/pangwei/tf1.1/) but you're right that I should make it explicit. I'm not sure why the newer version of Keras fails; let me know if you know how to fix it!"}}
{"actor":{"display_login":"kohpangwei"}}