aaronmarkham opened a new issue #8339: data iterators tutorial errors
URL: https://github.com/apache/incubator-mxnet/issues/8339
 
 
   ## Description
   Testing [this 
tutorial](https://github.com/apache/incubator-mxnet/blob/master/docs/tutorials/basic/data.md)
 on Python 3 shows an error.
   
   ## Environment info (Required)
   Python 3 env (reproduced on both Mac and DL AMI)
   
   ```
   What to do:
   1. Execute the tutorial.
   
   ```
   
   ## Error Message:
   
   ```
   ---------------------------------------------------------------------------
   ValueError                                Traceback (most recent call last)
   <ipython-input-6-a2ae3e4b88e5> in <module>()
         9 
        10 mod = mx.mod.Module(symbol=net)
   ---> 11 mod.fit(data_iter, num_epoch=5)
   
   
~/conda/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/module/base_module.py 
in fit(self, train_data, eval_data, eval_metric, epoch_end_callback, 
batch_end_callback, kvstore, optimizer, optimizer_params, eval_end_callback, 
eval_batch_end_callback, initializer, arg_params, aux_params, allow_missing, 
force_rebind, force_init, begin_epoch, num_epoch, validation_metric, monitor)
       485                 if monitor is not None:
       486                     monitor.tic()
   --> 487                 self.forward_backward(data_batch)
       488                 self.update()
       489                 try:
   
   
~/conda/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/module/base_module.py 
in forward_backward(self, data_batch)
       189     def forward_backward(self, data_batch):
       190         """A convenient function that calls both ``forward`` and 
``backward``."""
   --> 191         self.forward(data_batch, is_train=True)
       192         self.backward()
       193 
   
   ~/conda/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/module/module.py in 
forward(self, data_batch, is_train)
       592                 new_lshape = None
       593 
   --> 594             self.reshape(new_dshape, new_lshape)
       595 
       596         self._exec_group.forward(data_batch, is_train)
   
   ~/conda/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/module/module.py in 
reshape(self, data_shapes, label_shapes)
       455         assert self.binded
       456         self._data_shapes, self._label_shapes = _parse_data_desc(
   --> 457             self.data_names, self.label_names, data_shapes, 
label_shapes)
       458 
       459         self._exec_group.reshape(self._data_shapes, 
self._label_shapes)
   
   
~/conda/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/module/base_module.py 
in _parse_data_desc(data_names, label_names, data_shapes, label_shapes)
        69     """parse data_attrs into DataDesc format and check that names 
match"""
        70     data_shapes = [x if isinstance(x, DataDesc) else DataDesc(*x) 
for x in data_shapes]
   ---> 71     _check_names_match(data_names, data_shapes, 'data', True)
        72     if label_shapes is not None:
        73         label_shapes = [x if isinstance(x, DataDesc) else 
DataDesc(*x) for x in label_shapes]
   
   
~/conda/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/module/base_module.py 
in _check_names_match(data_names, data_shapes, name, throw)
        61             name, name, str(data_shapes), str(data_names))
        62         if throw:
   ---> 63             raise ValueError(msg)
        64         else:
        65             warnings.warn(msg)
   
   ValueError: Data provided by data_shapes don't match names specified by 
data_names ([] vs. ['data'])
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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