scotty3005 opened a new issue #14933: predict error in MXFeedForwardModel URL: https://github.com/apache/incubator-mxnet/issues/14933 ## Description Trying to get predictions for a simple regression model I geet the error posted in the relative section. I am working with R on ArchLinux. ## Environment info (Required) R version 3.5.3 (2019-03-11) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Arch Linux Matrix products: default BLAS: /usr/lib/libopenblasp-r0.3.5.so LAPACK: /usr/lib/liblapack.so.3.8.0 locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=C [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] mxnet_1.5.0 loaded via a namespace (and not attached): [1] Rcpp_1.0.1 plyr_1.8.4 pillar_1.3.1 compiler_3.5.3 [5] RColorBrewer_1.1-2 influenceR_0.1.0 viridis_0.5.1 tools_3.5.3 [9] digest_0.6.18 jsonlite_1.6 viridisLite_0.3.0 tibble_2.1.1 [13] gtable_0.2.0 rgexf_0.15.3 pkgconfig_2.0.2 rlang_0.3.4 [17] igraph_1.2.4.1 rstudioapi_0.10 gridExtra_2.3 downloader_0.4 [21] DiagrammeR_1.0.1 dplyr_0.8.0.1 stringr_1.4.0 htmlwidgets_1.3 [25] hms_0.4.2 grid_3.5.3 tidyselect_0.2.5 glue_1.3.1 [29] R6_2.4.0 Rook_1.1-1 XML_3.98-1.16 readr_1.3.1 [33] purrr_0.3.2 tidyr_0.8.3 ggplot2_3.0.0 magrittr_1.5 [37] codetools_0.2-16 scales_1.0.0 htmltools_0.3.6 assertthat_0.2.1 [41] colorspace_1.3-2 brew_1.0-6 stringi_1.4.3 visNetwork_2.0.6 [45] lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4 ## Build info (Required if built from source) Compiler: gcc MXNet commit hash: b22ee951ae45f7d34b9ae79433f318db5b6bc5ac Build config: ifndef CC export CC = gcc endif ifndef CXX export CXX = g++ endif ifndef NVCC export NVCC = nvcc endif DEV = 0 DEBUG = 0 USE_SIGNAL_HANDLER = ADD_LDFLAGS = ADD_CFLAGS = E_CUDA = 0 USE_CUDA_PATH = NONE ENABLE_CUDA_RTC = 1 USE_CUDNN = 0 USE_NVTX = 0 USE_NCCL = 0 USE_NCCL_PATH = NONE USE_OPENCV = 1 USE_OPENCV_INC_PATH = NONE USE_OPENCV_LIB_PATH = NONE USE_LIBJPEG_TURBO = 0 USE_LIBJPEG_TURBO_PATH = NONE USE_OPENMP = 1 USE_MKLDNN = USE_NNPACK = 0 UNAME_S := $(shell uname -s) ifeq ($(UNAME_S), Darwin) USE_BLAS = apple else USE_BLAS = atlas endif USE_LAPACK = 1 USE_LAPACK_PATH = USE_INTEL_PATH = NONE ifeq ($(USE_BLAS), mkl) USE_STATIC_MKL = 1 else USE_STATIC_MKL = NONE endif ARCH := $(shell uname -a) ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) USE_SSE=0 USE_F16C=0 else USE_SSE=1 endif USE_F16C = USE_DIST_KVSTORE = 0 USE_HDFS = 0 LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server USE_S3 = 0 USE_OPERATOR_TUNING = 1 USE_GPERFTOOLS = 0 USE_GPERFTOOLS_PATH = USE_GPERFTOOLS_STATIC = USE_JEMALLOC = 1 USE_JEMALLOC_PATH = USE_JEMALLOC_STATIC = EXTRA_OPERATORS = USE_CPP_PACKAGE = 0 USE_INT64_TENSOR_SIZE = 0 ## Error Message: Error in symbol$infer.shape(list(...)) : Error in operator logisticregressionoutput0: [17:10:24] include/mxnet/./tuple.h:202: Check failed: i >= 0 && i < ndim(): index = 0 must be in range [0, -1) Stack trace: [bt] (0) /home/filippo/R/x86_64-pc-linux-gnu-library/3.5/mxnet/libs/libmxnet.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x43) [0x7fd298e1d563] [bt] (1) /home/filippo/R/x86_64-pc-linux-gnu-library/3.5/mxnet/libs/libmxnet.so(mxnet::op::RegressionOpShape(nnvm::NodeAttrs const&, std::vector<mxnet::TShape, std::allocator<mxnet::TShape> >*, std::vector<mxnet::TShape, std::allocator<mxnet::TShape> >*)+0x621) [0x7fd29b2f9b91] [bt] (2) /home/filippo/R/x86_64-pc-linux-gnu-library/3.5/mxnet/libs/libmxnet.so(+0x24ddd09) [0x7fd29ad21d09] [bt] (3) /home/filippo/R/x86_64-pc-linux-gnu-library/3.5/mxnet/libs/libmxnet.so(mxnet::exec::InferShape(nnvm::Graph&&, std::vector<mxnet::TShape, std::allocator<mxnet::TShape> >&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x1677) [0x ## Minimum reproducible example library(mxnet) X0 = matrix(rnorm(2000, -10), ncol=2) X1 = matrix(rnorm(2000, 10), ncol=2) X = rbind(X0, X1) Y = c(rep(0, 1000), rep(1, 1000)) ii = sample(1:nrow(X)) X = X[ii,] Y = Y[ii] mdl = mx.symbol.Variable('data') mdl = mx.symbol.FullyConnected(mdl, num_hidden=1) mdl = mx.symbol.LogisticRegressionOutput(mdl) mdl = mx.model.FeedForward.create( mdl, X = X, y=Y, array.batch.size=100, num.round=100, #eval.data=list(data = X, label = Y), eval.metric = mx.metric.logloss, array.layout = 'rowmajor' ) predict(mdl, X, array.layout='rowmajor')
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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
