Open hvgazula opened 7 months ago
Again, if from_files
is used this will not be an issue the very first time because n_volumes
is specified ahead of time. However, this can be problematic when from_tfrecords
is used. Of course, the solution is https://github.com/neuronets/nobrainer/issues/321 :)
Following is an example of how the steps per epoch are incorrect whereas the number of batches is correct. This is because the
get_steps_per_epoch
usesn_volumes
whereas getting the number of batches entails iterating through the entire dataset which can be time-consuming. Currently,n_volumes
is calculated by iterating through the first shard and multiplying its size with the total number of shards. But this only works when all shards have the same number of volumes. One option is todrop_remainder
at the time of writing the shards itself.