Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

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

Closed
oatawa1 opened this issue Sep 2, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@oatawa1
Copy link
Contributor

oatawa1 commented Sep 2, 2020

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
@oatawa1 oatawa1 added the bug Something isn't working label Sep 2, 2020
@oatawa1 oatawa1 self-assigned this Sep 2, 2020
bo-mergebot bot pushed a commit that referenced this issue Sep 3, 2020
## What this patch does to fix the issue.
Change the minimum no. of `MAX_STEPS` to 1.

## Link to any relevant issues or pull requests.
#1194
@oatawa1 oatawa1 closed this as completed Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant