MXFusion icon indicating copy to clipboard operation
MXFusion copied to clipboard

Unexplicit throw in MinibatchInferenceLoop if batch_size is larger than dataset size

Open pabfer opened this issue 5 years ago • 1 comments

Describe the bug

If batch_size for MinibatchInferenceLoop is larger than the dataset size, this line throws due to division by zero.

Expected behavior

Possible mitigations are:

  • Option No. 1: Default batch size to min("requested batch size", "dataset size") and issue a warning if "requested batch size" > "dataset size".
  • Option No. 2: Throw with a message stating why it's throwing and how to fix the issue.

Desktop:

  • OS: Ubuntu 18.04.2
  • Python version: 3.6
  • MXNet version: 1.4.1
  • MXFusion version: 0.3.1
  • MXNet context: CPU

pabfer avatar Jul 06 '19 21:07 pabfer

thank you for issuing this problem. I have created a pull request to resolve this in the deploy branch.

DerrickGXD avatar Jul 18 '19 15:07 DerrickGXD