You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/02/21 13:59:19 UTC

[GitHub] jasperDD opened a new issue #14225: SyntaxError: invalid syntax in cycle for

jasperDD opened a new issue #14225: SyntaxError: invalid syntax in cycle for
URL: https://github.com/apache/incubator-mxnet/issues/14225
 
 
   test='C:\Users\Admin\Desktop\test.lst' # folder where must be my test.lst
   
   
   test='C:/Users/Admin/Desktop/test.lst'
   DataSet='C:/Users/Admin/Downloads/mypic/'
   
   data_iter = mx.image.ImageIter(
   batch_size=4,
   data_shape=(3,816, 1232),
   label_width=4,
   path_imglist='C:/Users/Admin/Desktop/test.lst',
   path_root='DataSet')
   
   for data in data_iter: d = data.data[0] 
   break
   
   error
   ==========================
   >>> for data in data_iter: d = data.data[0]
   ... break
     File "<stdin>", line 2
       break
           ^
   SyntaxError: invalid syntax
   >>>
   =================================
   
   
   >>> import numpy as nd
   >>> img =nd.transpose(d,(0,2,3,1))
   Traceback (most recent call last):
   Error
   ====
     File "<stdin>", line 1, in <module>
   NameError: name 'd' is not defined
   >>> d
   How to fix it?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services