{"action":"created","issue":{"url":"https://api.github.com/repos/wzell/cmd/issues/5","repository_url":"https://api.github.com/repos/wzell/cmd","labels_url":"https://api.github.com/repos/wzell/cmd/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/wzell/cmd/issues/5/comments","events_url":"https://api.github.com/repos/wzell/cmd/issues/5/events","html_url":"https://github.com/wzell/cmd/issues/5","id":241174405,"number":5,"title":"Run error","user":{"login":"jindongwang","id":6158206,"avatar_url":"https://avatars2.githubusercontent.com/u/6158206?v=3","gravatar_id":"","url":"https://api.github.com/users/jindongwang","html_url":"https://github.com/jindongwang","followers_url":"https://api.github.com/users/jindongwang/followers","following_url":"https://api.github.com/users/jindongwang/following{/other_user}","gists_url":"https://api.github.com/users/jindongwang/gists{/gist_id}","starred_url":"https://api.github.com/users/jindongwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jindongwang/subscriptions","organizations_url":"https://api.github.com/users/jindongwang/orgs","repos_url":"https://api.github.com/users/jindongwang/repos","events_url":"https://api.github.com/users/jindongwang/events{/privacy}","received_events_url":"https://api.github.com/users/jindongwang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-07T06:57:04Z","updated_at":"2017-07-08T02:18:44Z","closed_at":null,"body":"I'm using Python3.5+Tensorflow1.2+Keras on Windows 10, and I get the following error:\r\n---\r\n`C:\\Users\\jindongwang\\Anaconda3\\python.exe C:/Users/jindongwang/Desktop/cmd-master/exp_office.py\r\nUsing TensorFlow backend.\r\nWARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.\r\n\r\nLoading office image data...\r\nFound 2817 images belonging to 31 classes.\r\nFound 498 images belonging to 31 classes.\r\nFound 795 images belonging to 31 classes.\r\n\r\nCreating/Loading image representations via VGG_16 model...\r\nC:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\keras\\legacy\\interfaces.py:86: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(64, (3, 3), activation=\"relu\")`\r\n  '` call to the Keras 2 API: ' + signature)\r\nC:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\keras\\legacy\\interfaces.py:86: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(128, (3, 3), activation=\"relu\")`\r\n  '` call to the Keras 2 API: ' + signature)\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\common_shapes.py\", line 671, in _call_cpp_shape_fn_impl\r\n    input_tensors_as_shapes, status)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\contextlib.py\", line 66, in __exit__\r\n    next(self.gen)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\errors_impl.py\", line 466, in raise_exception_on_not_ok_status\r\n    pywrap_tensorflow.TF_GetCode(status))\r\ntensorflow.python.framework.errors_impl.InvalidArgumentError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,112,128].\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"C:/Users/jindongwang/Desktop/cmd-master/exp_office.py\", line 53, in <module>\r\n    'amazon', N_IMAGES_AM)\r\n  File \"C:\\Users\\jindongwang\\Desktop\\cmd-master\\models\\office_mmatch.py\", line 154, in create_img_repr\r\n    vgg16 = self.VGG_16(weights_file)\r\n  File \"C:\\Users\\jindongwang\\Desktop\\cmd-master\\models\\office_mmatch.py\", line 285, in VGG_16\r\n    model.add(MaxPooling2D((2,2), strides=(2,2)))\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\keras\\models.py\", line 455, in add\r\n    output_tensor = layer(self.outputs[0])\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\keras\\engine\\topology.py\", line 554, in __call__\r\n    output = self.call(inputs, **kwargs)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\keras\\layers\\pooling.py\", line 154, in call\r\n    data_format=self.data_format)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\keras\\layers\\pooling.py\", line 217, in _pooling_function\r\n    pool_mode='max')\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py\", line 3014, in pool2d\r\n    x = tf.nn.max_pool(x, pool_size, strides, padding=padding)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\ops\\nn_ops.py\", line 1769, in max_pool\r\n    name=name)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\ops\\gen_nn_ops.py\", line 1605, in _max_pool\r\n    data_format=data_format, name=name)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py\", line 767, in apply_op\r\n    op_def=op_def)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 2508, in create_op\r\n    set_shapes_for_outputs(ret)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 1873, in set_shapes_for_outputs\r\n    shapes = shape_func(op)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 1823, in call_with_requiring\r\n    return call_cpp_shape_fn(op, require_shape_fn=True)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\common_shapes.py\", line 610, in call_cpp_shape_fn\r\n    debug_python_shape_fn, require_shape_fn)\r\n  File \"C:\\Users\\jindongwang\\Anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\common_shapes.py\", line 676, in _call_cpp_shape_fn_impl\r\n    raise ValueError(err.message)\r\nValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,112,128].\r\n\r\nProcess finished with exit code 1`\r\n---\r\nWhat can I do?"},"comment":{"url":"https://api.github.com/repos/wzell/cmd/issues/comments/313827555","html_url":"https://github.com/wzell/cmd/issues/5#issuecomment-313827555","issue_url":"https://api.github.com/repos/wzell/cmd/issues/5","id":313827555,"user":{"login":"jindongwang","id":6158206,"avatar_url":"https://avatars2.githubusercontent.com/u/6158206?v=3","gravatar_id":"","url":"https://api.github.com/users/jindongwang","html_url":"https://github.com/jindongwang","followers_url":"https://api.github.com/users/jindongwang/followers","following_url":"https://api.github.com/users/jindongwang/following{/other_user}","gists_url":"https://api.github.com/users/jindongwang/gists{/gist_id}","starred_url":"https://api.github.com/users/jindongwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jindongwang/subscriptions","organizations_url":"https://api.github.com/users/jindongwang/orgs","repos_url":"https://api.github.com/users/jindongwang/repos","events_url":"https://api.github.com/users/jindongwang/events{/privacy}","received_events_url":"https://api.github.com/users/jindongwang/received_events","type":"User","site_admin":false},"created_at":"2017-07-08T02:18:44Z","updated_at":"2017-07-08T02:18:44Z","body":"Thanks for that! In fact I'm very interested in the CMD metric and want to use it independently as MMD. Is this possible?\r\n\r\n\r\n\r\nOn 2017/7/7 18:30:26, wzell <notifications@github.com> wrote:\r\n\r\nI think this has something to do with the change of the keras backend from theano to tensorflow, see e.g.\r\nfchollet/keras#3945<https://github.com/fchollet/keras/issues/3945>.\r\nThe change in the json file should help.\r\n\r\n—\r\nYou are receiving this because you authored the thread.\r\nReply to this email directly, view it on GitHub<https://github.com/wzell/cmd/issues/5#issuecomment-313646652>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AF33fispMdBJuj1dtboL6bCYJmxSalmwks5sLgi-gaJpZM4OQj7r>.\r\n"}}
{"actor":{"display_login":"jindongwang"}}