Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fixed issue where the estimator was printing beyond the dataset size … #14464

Merged
merged 3 commits into from
Mar 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/mxnet/gluon/estimator/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ def fit(self, train_data,
self.train_stats['batch_' + loss_metric.name] = loss_metric.get()[1]

try:
self.train_stats['step'] = "{}/{}".format(batch_size * (i + 1), len(train_data._dataset))
completed_samples = len(train_data._dataset) if i == len(train_data._dataset) - 1 \
piyushghai marked this conversation as resolved.
Show resolved Hide resolved
else batch_size * (i + 1)
self.train_stats['step'] = "{}/{}".format(completed_samples, len(train_data._dataset))
except AttributeError:
self.train_stats['step'] = i

Expand Down