abhinavs95 commented on a change in pull request #14587: [MXNET-1344, 1346][FIT 
API] Retrieve Batch size and Logging verbose support for Gluon fit() API
URL: https://github.com/apache/incubator-mxnet/pull/14587#discussion_r271951055
 
 

 ##########
 File path: python/mxnet/gluon/estimator/estimator.py
 ##########
 @@ -241,16 +240,35 @@ def fit(self, train_data,
             from a data batch and load into contexts(devices)
         """
 
-
         self.epochs = epochs
-        if not batch_size:
-            batch_size = 32 * len(self.context)
+        if isinstance(train_data, gluon.data.DataLoader):
+            num_batches = len(train_data)
+            total_samples = len(train_data._dataset)
+            if total_samples == 0:
+                raise ValueError("DataLoader is Empty. Please refer to 
gluon.data.DataLoader "
+                                 "for more detail")
+            for dt, _ in train_data:
 
 Review comment:
   yes that won't work, thanks for clarifying.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to