{"action":"created","issue":{"url":"https://api.github.com/repos/elcorto/imagecluster/issues/5","repository_url":"https://api.github.com/repos/elcorto/imagecluster","labels_url":"https://api.github.com/repos/elcorto/imagecluster/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/elcorto/imagecluster/issues/5/comments","events_url":"https://api.github.com/repos/elcorto/imagecluster/issues/5/events","html_url":"https://github.com/elcorto/imagecluster/issues/5","id":356293047,"node_id":"MDU6SXNzdWUzNTYyOTMwNDc=","number":5,"title":"error on shape size (224, 224, 4) maybe related to keras/tenserflow versions?","user":{"login":"idanr1986","id":8653466,"node_id":"MDQ6VXNlcjg2NTM0NjY=","avatar_url":"https://avatars3.githubusercontent.com/u/8653466?v=4","gravatar_id":"","url":"https://api.github.com/users/idanr1986","html_url":"https://github.com/idanr1986","followers_url":"https://api.github.com/users/idanr1986/followers","following_url":"https://api.github.com/users/idanr1986/following{/other_user}","gists_url":"https://api.github.com/users/idanr1986/gists{/gist_id}","starred_url":"https://api.github.com/users/idanr1986/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idanr1986/subscriptions","organizations_url":"https://api.github.com/users/idanr1986/orgs","repos_url":"https://api.github.com/users/idanr1986/repos","events_url":"https://api.github.com/users/idanr1986/events{/privacy}","received_events_url":"https://api.github.com/users/idanr1986/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-09-02T15:54:22Z","updated_at":"2018-10-09T08:28:41Z","closed_at":null,"author_association":"NONE","body":"======================================================================\r\nERROR: Failure: ValueError (Error when checking input: expected input_2 to have shape (224, 224, 3) but got array with shape (224, 224, 4))\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3/dist-packages/nose/failure.py\", line 39, in runTest\r\n    raise self.exc_val.with_traceback(self.tb)\r\n  File \"/usr/lib/python3/dist-packages/nose/loader.py\", line 418, in loadTestsFromName\r\n    addr.filename, addr.module)\r\n  File \"/usr/lib/python3/dist-packages/nose/importer.py\", line 47, in importFromPath\r\n    return self.importFromDir(dir_path, fqname)\r\n  File \"/usr/lib/python3/dist-packages/nose/importer.py\", line 94, in importFromDir\r\n    mod = load_module(part_fqname, fh, filename, desc)\r\n  File \"/usr/lib/python3.5/imp.py\", line 234, in load_module\r\n    return load_source(name, filename, file)\r\n  File \"/usr/lib/python3.5/imp.py\", line 172, in load_source\r\n    module = _load(spec)\r\n  File \"<frozen importlib._bootstrap>\", line 693, in _load\r\n  File \"<frozen importlib._bootstrap>\", line 673, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap_external>\", line 673, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\r\n  File \"/home/mobile/imagecluster/test.py\", line 2, in <module>\r\n    main.main('/home/mobile/app_icons/images', sim=0.5)\r\n  File \"/home/mobile/imagecluster/imagecluster/main.py\", line 28, in main\r\n    fps = ic.fingerprints(files, model, size=(224,224))\r\n  File \"/home/mobile/imagecluster/imagecluster/imagecluster.py\", line 131, in fingerprints\r\n    return dict((fn, fingerprint(fn, model, size)) for fn in files)\r\n  File \"/home/mobile/imagecluster/imagecluster/imagecluster.py\", line 131, in <genexpr>\r\n    return dict((fn, fingerprint(fn, model, size)) for fn in files)\r\n  File \"/home/mobile/imagecluster/imagecluster/imagecluster.py\", line 90, in fingerprint\r\n    return model.predict(arr4d_pp)[0,:]\r\n  File \"/usr/local/lib/python3.5/dist-packages/keras/engine/training.py\", line 1147, in predict\r\n    x, _, _ = self._standardize_user_data(x)\r\n  File \"/usr/local/lib/python3.5/dist-packages/keras/engine/training.py\", line 749, in _standardize_user_data\r\n    exception_prefix='input')\r\n  File \"/usr/local/lib/python3.5/dist-packages/keras/engine/training_utils.py\", line 137, in standardize_input_data\r\n    str(data_shape))\r\nValueError: Error when checking input: expected input_2 to have shape (224, 224, 3) but got array with shape (224, 224, 4)\r\n-------------------- >> begin captured logging << --------------------\r\nPIL.PngImagePlugin: DEBUG: STREAM b'IHDR' 16 13\r\nPIL.PngImagePlugin: DEBUG: STREAM b'IDAT' 41 6482\r\n--------------------- >> end captured logging << ---------------------\r\n\r\n----------------------------------------------------------------------\r\nRan 2 tests in 33.882s\r\n\r\nFAILED (errors=1)"},"comment":{"url":"https://api.github.com/repos/elcorto/imagecluster/issues/comments/428106109","html_url":"https://github.com/elcorto/imagecluster/issues/5#issuecomment-428106109","issue_url":"https://api.github.com/repos/elcorto/imagecluster/issues/5","id":428106109,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODEwNjEwOQ==","user":{"login":"elcorto","id":13417423,"node_id":"MDQ6VXNlcjEzNDE3NDIz","avatar_url":"https://avatars2.githubusercontent.com/u/13417423?v=4","gravatar_id":"","url":"https://api.github.com/users/elcorto","html_url":"https://github.com/elcorto","followers_url":"https://api.github.com/users/elcorto/followers","following_url":"https://api.github.com/users/elcorto/following{/other_user}","gists_url":"https://api.github.com/users/elcorto/gists{/gist_id}","starred_url":"https://api.github.com/users/elcorto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcorto/subscriptions","organizations_url":"https://api.github.com/users/elcorto/orgs","repos_url":"https://api.github.com/users/elcorto/repos","events_url":"https://api.github.com/users/elcorto/events{/privacy}","received_events_url":"https://api.github.com/users/elcorto/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T08:28:41Z","updated_at":"2018-10-09T08:28:41Z","author_association":"OWNER","body":"I'll leave that open as a reminder. I'll add a PIL way to convert RGBA -> RBG when I have the time. Thanks for reporting."}}
{"actor":{"display_login":"elcorto"}}