blue-oil/blueoil

In case of really small dataset. MAX_STEPS can be less than 1 and lead to error.

oatawa1 opened this issue · 0 comments

From this line of code

max_steps = int(train_dataset.num_per_epoch / config.BATCH_SIZE * config.MAX_EPOCHS)

When the dataset is really small, precisely, no. of train dataset*max_epochs < batch_size, it can cause max_steps = 0 which leads to OverflowError.

  File "blueoil/cmd/train.py", line 200, in start_training
    progbar.update(last_step)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/utils/generic_utils.py", line 396, in update
    numdigits = int(np.log10(self.target)) + 1
OverflowError: cannot convert float infinity to integer