zhreshold commented on issue #17485:
URL: 
https://github.com/apache/incubator-mxnet/issues/17485#issuecomment-764904092


   @karan6181 
   after investigating the mask rcnn, I think a simple fix should do the trick 
to allow validation work with models initialized with `batch_size > 1`:
   
   here: 
https://github.com/dmlc/gluon-cv/blob/ecf491685018e951bec12f9e45bc482749de4f85/gluoncv/model_zoo/rcnn/mask_rcnn/mask_rcnn.py#L85
   
   we can modify this line to 
   
   ```python
   if autograd.is_training():
       x = x.reshape((-4, self._batch_images, -1, 0, 0, 0))
   else:
       # always use batch_size = 1 for inference
       x = x.reshape((-4, 1, -1, 0, 0, 0))
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to