some-guy1 edited a comment on issue #12428: [R] mx.io.CSVIter not loading 
labels in version 1.3.0
URL: 
https://github.com/apache/incubator-mxnet/issues/12428#issuecomment-419603828
 
 
   Ok this is confusing living heck out of me.  I ran your code above and 
iter$value() results in the dimensions I would expect.  Hence, this appears 
correct.
   
   BUT, I tried again to simply run only my code below
   
   ```
   
   train_iter <- mx.io.CSVIter(
     data_csv = "A.csv", data_shape = c(3, 3, 1),
     label_csv = "A.csv", label_shape =  c(3, 3, 1),
     batch_size = 1
   )
   
   train_iter$reset()
   train_iter$iter.next()
   train_iter$value()
   ```
   and I still only get one value in the label.  I am expecting $label to be 
identical to $data
   
   ```
   $label
   [1] 1.373546
   ```
   
   Now instead if I run: 
   
   ```
   
   train_iter <- mx.io.CSVIter(
     data_csv = "A.csv", data_shape = c(3, 3, 1),
     label_csv = "A.csv", label_shape =  c(3, 1, 3),
     batch_size = 1
   )
   
   train_iter$reset()
   train_iter$iter.next()
   train_iter$value()
   ```
   
   I get 
   
   ```
   $`data`
   , , 1, 1
   
             [,1]     [,2]     [,3]
   [1,] 1.1643714 2.689276 2.152658
   [2,] 0.8696243 1.527834 1.233204
   [3,] 2.1957829 2.738622 1.815747
   
   
   $label
   , , 1, 1
   
             [,1]
   [1,] 1.1643714
   [2,] 0.8696243
   [3,] 2.1957829
   
   , , 2, 1
   
            [,1]
   [1,] 2.689276
   [2,] 1.527834
   [3,] 2.738622
   
   , , 3, 1
   
            [,1]
   [1,] 2.152658
   [2,] 1.233204
   [3,] 1.815747
   ```
   
   Is it possible that the label axis is rotated relative to the data axis? Are 
we supposed to transpose the label axis until is matches the data axis?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to