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 2018/08/07 22:35:39 UTC

[GitHub] ankkhedia commented on issue #8521: Issue Regarding Custom Iterator Using MxnetR

ankkhedia commented on issue #8521: Issue Regarding Custom Iterator Using MxnetR
URL: https://github.com/apache/incubator-mxnet/issues/8521#issuecomment-411224866
 
 
   Hi @Phillip1982 and @dwy904. Thanks for trying out MXNet-R.
   The answer to your query lies in the way csviterator in MXNet is designed and how R converts one data structure to other. If you could see the description and examples for CSVIterator in https://github.com/apache/incubator-mxnet/blob/master/src/io/iter_csv.cc, you will see that data_shape parameter converts each line in csv file to that shape. In our case, we pass data_shape=785 and hence each line is read as a list of 785 elements and it reads batch size number of lines and returns this data structure. 
   
   While converting from list/vectors/dataframes to matrix/arrays using  as.array, MXNet NDarray confers with R standards which is column major format and hence the batch size becomes number of columns and features becomes number of rows. 
   
   
   On a side note, please post any questions on discuss.mxnet.io as it gets visibility from wider audience.
   @dwy904 @Phillip1982 please feel free to raise any followup questions on discuss.mxnet.io 
   
   @sandeep-krishnamurthy  Could you please close the issue as it has been resolved  
   

----------------------------------------------------------------
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