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/31 23:44:04 UTC
[GitHub] some-guy1 opened a new issue #12428: [R] mx.io.CSVIter not loading
labels in version 1.2.0
some-guy1 opened a new issue #12428: [R] mx.io.CSVIter not loading labels in version 1.2.0
URL: https://github.com/apache/incubator-mxnet/issues/12428
I am on Windows 10. The code given below used to work fine in older versions of mxnet (older than 1.2.0). In version 1.2.0, it seems data.csv is loaded, but label.csv is skipped.
I am using R 3.5.0
**### sessionInfo()**
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gtools_3.8.1 Matrix_1.2-14 mxnet_1.2.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.16 pillar_1.2.2 compiler_3.5.0 RColorBrewer_1.1-2 influenceR_0.1.0 plyr_1.8.4
[7] bindr_0.1.1 viridis_0.5.1 tools_3.5.0 digest_0.6.15 lattice_0.20-35 jsonlite_1.5
[13] viridisLite_0.3.0 tibble_1.4.2 gtable_0.2.0 rgexf_0.15.3 pkgconfig_2.0.1 rlang_0.2.0
[19] igraph_1.2.1 rstudioapi_0.7 yaml_2.1.19 bindrcpp_0.2.2 gridExtra_2.3 downloader_0.4
[25] DiagrammeR_1.0.0 dplyr_0.7.4 stringr_1.3.1 htmlwidgets_1.2 hms_0.4.2 grid_3.5.0
[31] glue_1.2.0 R6_2.2.2 Rook_1.1-1 XML_3.98-1.11 readr_1.1.1 purrr_0.2.4
[37] tidyr_0.8.0 ggplot2_2.2.1 magrittr_1.5 codetools_0.2-15 scales_0.5.0 htmltools_0.3.6
[43] assertthat_0.2.0 colorspace_1.3-2 brew_1.0-6 stringi_1.2.2 visNetwork_2.0.3 lazyeval_0.2.1
[49] munsell_0.4.3
## Build info
Build is from jermiedb:
https://github.com/jeremiedb/mxnet_winbin
## Error Message:
Error in symbol$infer.shape(list(...)) :
Error in operator lro: Shape inconsistent, Provided=[1], inferred shape=[1,1,3,3]
## Minimum reproducible example
batch_size = 1
train_iter <- mx.io.CSVIter(
data.csv = "./matty_inv/A.csv", data.shape = c(3,3,1),
label.csv = "./matty_inv/A.csv", label.shape = c(3, 3, 1),
batch.size = batch_size
)
data <- mx.symbol.Variable('data')
label <- mx.symbol.Variable('label')
conv_1 <- mx.symbol.Convolution(data= data, kernel = c(1,1), num_filter = 4, name="conv_1")
conv_act_1 <- mx.symbol.Activation(data= conv_1, act_type = "relu", name="conv_act_1")
flat <- mx.symbol.flatten(data = conv_act_1, name="flatten")
fcl_1 <- mx.symbol.FullyConnected(data = flat, num_hidden = 9, name="fc_1")
fcl_2 <- mx.symbol.reshape(fcl_1, shape=c(3,3, 1, batch_size))
NN_Model <- mx.symbol.LinearRegressionOutput(data=fcl_2 , label=label, name="lro")
mx.set.seed(99)
autoencoder <- mx.model.FeedForward.create(
NN_Model, X=train_iter, initializer = mx.init.uniform(0.01),
ctx=mx.cpu(), num.round=n.rounds, array.batch.size=batch_size,
learning.rate=8e-3, array.layout = "rowmajor",
eval.metric = mx.metric.rmse, optimizer = "adam",
verbose = TRUE)
----------------------------------------------------------------
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