{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/2648","repository_url":"https://api.github.com/repos/BVLC/caffe","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/2648/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/2648/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/2648/events","html_url":"https://github.com/BVLC/caffe/issues/2648","id":91111988,"number":2648,"title":"MemoryDataLayer Reshape C++ problem","user":{"login":"mnmoustafa","id":11455665,"avatar_url":"https://avatars.githubusercontent.com/u/11455665?v=3","gravatar_id":"","url":"https://api.github.com/users/mnmoustafa","html_url":"https://github.com/mnmoustafa","followers_url":"https://api.github.com/users/mnmoustafa/followers","following_url":"https://api.github.com/users/mnmoustafa/following{/other_user}","gists_url":"https://api.github.com/users/mnmoustafa/gists{/gist_id}","starred_url":"https://api.github.com/users/mnmoustafa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnmoustafa/subscriptions","organizations_url":"https://api.github.com/users/mnmoustafa/orgs","repos_url":"https://api.github.com/users/mnmoustafa/repos","events_url":"https://api.github.com/users/mnmoustafa/events{/privacy}","received_events_url":"https://api.github.com/users/mnmoustafa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BVLC/caffe/labels/JL","name":"JL","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-06-26T00:29:00Z","updated_at":"2016-07-12T09:23:25Z","closed_at":null,"body":"I am trying the net surgery (a fully convolutional network) example in C++. I am using MemoryDataLayer so I can feed the network from memory (images with different sizes). For each new image, I call Reshape for my input blob and Reshape() for my net to accommodate the new input image size. However, MemoryDataLayer::AddMatVector fails with:\r\n```\r\nF0626 01:56:41.623599 12815 data_transformer.cpp:260] Check failed: img_height == height (1116 vs. 600)\r\n```\r\nSo even after Reshape, MemoryDataLayer batch_size(), channels(), height(), and width() is still using the original image dimensions (from the proto file, 600 in my case above). On the other hand, the blobs dimensions have been correctly updated.\r\n\r\nIs this a bug or a misuse from my side?\r\nThanks,"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/231985238","html_url":"https://github.com/BVLC/caffe/issues/2648#issuecomment-231985238","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/2648","id":231985238,"user":{"login":"matthieu637","id":1049758,"avatar_url":"https://avatars.githubusercontent.com/u/1049758?v=3","gravatar_id":"","url":"https://api.github.com/users/matthieu637","html_url":"https://github.com/matthieu637","followers_url":"https://api.github.com/users/matthieu637/followers","following_url":"https://api.github.com/users/matthieu637/following{/other_user}","gists_url":"https://api.github.com/users/matthieu637/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieu637/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieu637/subscriptions","organizations_url":"https://api.github.com/users/matthieu637/orgs","repos_url":"https://api.github.com/users/matthieu637/repos","events_url":"https://api.github.com/users/matthieu637/events{/privacy}","received_events_url":"https://api.github.com/users/matthieu637/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T09:23:25Z","updated_at":"2016-07-12T09:23:25Z","body":"I've got the same problem with the MemoryDataLayer.\r\nIn my case, I need only to increase the batch size, luckily there is a set_batch_size() function for MemoryDataLayer that must be called when I use Reshape on the blob&network.\r\n\r\nFor the channels, height, width don't know how to fix it."}}
{"actor":{"display_login":"matthieu637"}}