{"action":"opened","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/5299","repository_url":"https://api.github.com/repos/dmlc/mxnet","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/5299/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/5299/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/5299/events","html_url":"https://github.com/dmlc/mxnet/issues/5299","id":212586476,"number":5299,"title":"Using different batch sizes for training and development sets","user":{"login":"jdchoi77","id":1037146,"avatar_url":"https://avatars2.githubusercontent.com/u/1037146?v=3","gravatar_id":"","url":"https://api.github.com/users/jdchoi77","html_url":"https://github.com/jdchoi77","followers_url":"https://api.github.com/users/jdchoi77/followers","following_url":"https://api.github.com/users/jdchoi77/following{/other_user}","gists_url":"https://api.github.com/users/jdchoi77/gists{/gist_id}","starred_url":"https://api.github.com/users/jdchoi77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdchoi77/subscriptions","organizations_url":"https://api.github.com/users/jdchoi77/orgs","repos_url":"https://api.github.com/users/jdchoi77/repos","events_url":"https://api.github.com/users/jdchoi77/events{/privacy}","received_events_url":"https://api.github.com/users/jdchoi77/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-07T23:00:36Z","updated_at":"2017-03-07T23:00:36Z","closed_at":null,"body":"I followed the tutorial for creating a custom data iterator and it gives an unintuitive error when I use different batch sizes for training and development data.  Specifically, the attached code runs fine when I set both trn_batch_size and dev_batch_size to the same value (e.g., 128) on lines 62-63; however, it gives an error when they are set to different values:\r\n\r\n```\r\ntrn_batch_size = 128\r\ndev_batch_size = 64\r\n```\r\nA similar problem with lines 74-75 when I tried to predict:\r\n\r\n```\r\nys = mod.predict(SimpleIter(num_classes, num_features, dev_batch_size))\r\ny = mod.predict(mx.io.NDArrayIter(np.random.rand(num_features)))\r\n```\r\n\r\nIs there way of getting around this without zero padding to the same batch size?  Thanks!\r\n[test.py.zip](https://github.com/dmlc/mxnet/files/826095/test.py.zip)\r\n\r\n"}}
{"actor":{"display_login":"jdchoi77"}}