{"action":"opened","issue":{"url":"https://api.github.com/repos/HiiYL/PiQual-Web/issues/1","repository_url":"https://api.github.com/repos/HiiYL/PiQual-Web","labels_url":"https://api.github.com/repos/HiiYL/PiQual-Web/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/HiiYL/PiQual-Web/issues/1/comments","events_url":"https://api.github.com/repos/HiiYL/PiQual-Web/issues/1/events","html_url":"https://github.com/HiiYL/PiQual-Web/issues/1","id":250058337,"number":1,"title":"ValueError: The channel dimension of the inputs should be defined. Found `None`.","user":{"login":"shinebay","id":7820385,"avatar_url":"https://avatars2.githubusercontent.com/u/7820385?v=4","gravatar_id":"","url":"https://api.github.com/users/shinebay","html_url":"https://github.com/shinebay","followers_url":"https://api.github.com/users/shinebay/followers","following_url":"https://api.github.com/users/shinebay/following{/other_user}","gists_url":"https://api.github.com/users/shinebay/gists{/gist_id}","starred_url":"https://api.github.com/users/shinebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinebay/subscriptions","organizations_url":"https://api.github.com/users/shinebay/orgs","repos_url":"https://api.github.com/users/shinebay/repos","events_url":"https://api.github.com/users/shinebay/events{/privacy}","received_events_url":"https://api.github.com/users/shinebay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-14T15:01:41Z","updated_at":"2017-08-14T15:01:41Z","closed_at":null,"body":"Thanks for sharing this project, when I test piqual, it returns this error:\r\n\r\n> Using TensorFlow backend.\r\n> /home/website/i4/piqual/model.py:16: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(64, (3, 3), padding=\"same\", activation=\"relu\", name=\"conv1_1\")`\r\n>   x = Convolution2D(64, 3, 3, activation='relu',name='conv1_1',border_mode ='same')(inputs)\r\n> Traceback (most recent call last):\r\n>   File \"p.py\", line 7, in <module>\r\n>     model = VGG_19_GAP_functional(\"aesthestic_gap_weights_1_tensorflow.h5\", heatmap=False)\r\n>   File \"/home/website/i4/piqual/model.py\", line 16, in VGG_19_GAP_functional\r\n>     x = Convolution2D(64, 3, 3, activation='relu',name='conv1_1',border_mode ='same')(inputs)\r\n>   File \"/usr/lib/python2.7/site-packages/keras/engine/topology.py\", line 569, in __call__\r\n>     self.build(input_shapes[0])\r\n>   File \"/usr/lib/python2.7/site-packages/keras/layers/convolutional.py\", line 125, in build\r\n>     raise ValueError('The channel dimension of the inputs '\r\n> ValueError: The channel dimension of the inputs should be defined. Found `None`.\r\n\r\nhere is my code:\r\n\r\n```\r\nimport os\r\nimport numpy as np\r\nimport cv2\r\nfrom keras.models import load_model\r\nfrom model import VGG_19_GAP_functional\r\nfrom utils import preprocess_image,deprocess_image\r\nmodel = VGG_19_GAP_functional(\"aesthestic_gap_weights_1_tensorflow.h5\", heatmap=False)\r\n\r\nfile=open(\"1.jpg\", \"rw+\")\r\nfile.seek(0)\r\noriginal_img = cv2.resize(cv2.imdecode(np.fromstring(file.read(), np.uint8), cv2.IMREAD_COLOR), (224,224))\r\nim = preprocess_image(original_img)\r\nout = model.predict(im)\r\n```\r\n\r\nso how to solve this problem? thanks in advance\r\n"}}
{"actor":{"display_login":"shinebay"}}