{"action":"created","issue":{"url":"https://api.github.com/repos/awentzonline/image-analogies/issues/19","repository_url":"https://api.github.com/repos/awentzonline/image-analogies","labels_url":"https://api.github.com/repos/awentzonline/image-analogies/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/awentzonline/image-analogies/issues/19/comments","events_url":"https://api.github.com/repos/awentzonline/image-analogies/issues/19/events","html_url":"https://github.com/awentzonline/image-analogies/issues/19","id":140719115,"number":19,"title":"Cuda Dimension Mismatch","user":{"login":"DrChromaticNo","id":3902054,"avatar_url":"https://avatars.githubusercontent.com/u/3902054?v=3","gravatar_id":"","url":"https://api.github.com/users/DrChromaticNo","html_url":"https://github.com/DrChromaticNo","followers_url":"https://api.github.com/users/DrChromaticNo/followers","following_url":"https://api.github.com/users/DrChromaticNo/following{/other_user}","gists_url":"https://api.github.com/users/DrChromaticNo/gists{/gist_id}","starred_url":"https://api.github.com/users/DrChromaticNo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrChromaticNo/subscriptions","organizations_url":"https://api.github.com/users/DrChromaticNo/orgs","repos_url":"https://api.github.com/users/DrChromaticNo/repos","events_url":"https://api.github.com/users/DrChromaticNo/events{/privacy}","received_events_url":"https://api.github.com/users/DrChromaticNo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T16:08:26Z","updated_at":"2016-03-14T16:38:23Z","closed_at":null,"body":"when running this command\r\n\r\npython2.7 make_image_analogy.py ~/Documents/imganal/examples/images/arch-A.jpg ~/Documents/imganal/examples/images/arch-Ap.jpg ~/Documents/imganal/examples/images/arch-B.jpg ~/Documents/imganal/out/img\r\n\r\n on the arch example it runs for one pass (0x0 through 0x4) and then I get the following trace:\r\n\r\nTraceback (most recent call last):\r\n  File \"make_image_analogy.py\", line 25, in <module>\r\n    image_analogy.main.main(args, model_class)\r\n  File \"build/bdist.linux-x86_64/egg/image_analogy/main.py\", line 69, in main\r\n    model.build(a_image, ap_image, b_image, (1, img_num_channels, img_height, img_width))\r\n  File \"build/bdist.linux-x86_64/egg/image_analogy/models/base.py\", line 23, in build\r\n  File \"build/bdist.linux-x86_64/egg/image_analogy/models/analogy.py\", line 22, in build_loss\r\n  File \"build/bdist.linux-x86_64/egg/image_analogy/models/base.py\", line 51, in precompute_static_features\r\n  File \"build/bdist.linux-x86_64/egg/image_analogy/models/base.py\", line 60, in get_features\r\n  File \"/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py\", line 384, in __call__\r\n    return self.function(*inputs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py\", line 871, in __call__\r\n    storage_map=getattr(self.fn, 'storage_map', None))\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/link.py\", line 314, in raise_with_op\r\n    reraise(exc_type, exc_value, exc_trace)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py\", line 859, in __call__\r\n    outputs = self.fn()\r\nValueError: CudaNdarray_CopyFromCudaNdarray: need same dimensions for dim 2, destination=290, source=289\r\nApply node that caused the error: GpuIncSubtensor{InplaceSet;::, ::, int64:int64:, int64:int64:}(GpuAlloc{memset_0=True}.0, GpuElemwise{Composite{(i0 * ((i1 + i2) + Abs((i1 + i2))))}}[(0, 1)].0, Constant{1}, Constant{291}, Constant{1}, Constant{201})\r\nToposort index: 46\r\nInputs types: [CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), Scalar(int64), Scalar(int64), Scalar(int64), Scalar(int64)]\r\nInputs shapes: [(1, 64, 292, 202), (1, 64, 289, 200), (), (), (), ()]\r\nInputs strides: [(0, 58984, 202, 1), (0, 57800, 200, 1), (), (), (), ()]\r\nInputs values: ['not shown', 'not shown', 1, 291, 1, 201]\r\nOutputs clients: [[GpuContiguous(GpuIncSubtensor{InplaceSet;::, ::, int64:int64:, int64:int64:}.0)]]\r\n\r\nall my requirements are up to date/correct (or at least pip install -r requirements.txt says so).  I've had this project installed for awhile so it might be that the cruft from older versions is conflicting with this one (it's not in a venv or anything).  I think it has something to do with the img heights and widths.  If I run with an example where A is not the same dimensions as B, it crashes before the first pass...  I vaguely remember this problem happening on an older version of this project but I forget how I fixed it.  I'm not sure if it's me or the new version, any ideas?"},"comment":{"url":"https://api.github.com/repos/awentzonline/image-analogies/issues/comments/196402250","html_url":"https://github.com/awentzonline/image-analogies/issues/19#issuecomment-196402250","issue_url":"https://api.github.com/repos/awentzonline/image-analogies/issues/19","id":196402250,"user":{"login":"awentzonline","id":5231065,"avatar_url":"https://avatars.githubusercontent.com/u/5231065?v=3","gravatar_id":"","url":"https://api.github.com/users/awentzonline","html_url":"https://github.com/awentzonline","followers_url":"https://api.github.com/users/awentzonline/followers","following_url":"https://api.github.com/users/awentzonline/following{/other_user}","gists_url":"https://api.github.com/users/awentzonline/gists{/gist_id}","starred_url":"https://api.github.com/users/awentzonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awentzonline/subscriptions","organizations_url":"https://api.github.com/users/awentzonline/orgs","repos_url":"https://api.github.com/users/awentzonline/repos","events_url":"https://api.github.com/users/awentzonline/events{/privacy}","received_events_url":"https://api.github.com/users/awentzonline/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T16:38:23Z","updated_at":"2016-03-14T16:38:23Z","body":"Thanks for reporting. I remember there being some random issues with different sized inputs and theano CPU mode but it doesn't look like either apply here. Could you try with `--a-scale-mode=match`? Also it might be worth installing in a venv to make sure there's not some random garbage messing it up."}}