cma2015 / DeepGS

DeepGS is a R package for predicting phenotypes from genotypes using deep learning techniques.
49 stars 19 forks source link

error when running the example #2

Open Joyvalley opened 6 years ago

Joyvalley commented 6 years ago

Hi, i installed your packaged and tried to run the example you give using Version 1.0. I get the following error message: I am using R 3.4.2 with Ubuntu 16.4

[1] "the image size is equal with the original snp number"
Start training with 1 devices
Error in mx.nd.internal.dispatch.Ops(.Generic, e1, e2) : 
  [11:41:33] src/operator/tensor/./../elemwise_op_common.h:123: Check failed: assign(&dattr, (*vec)[i]) Incompatible attr in node  at 1-th input: expected [100], got [100,1]

Stack trace returned 10 entries:
[bt] (0) /home/jan/R/x86_64-pc-linux-gnu-library/3.4/mxnet/libs/libmxnet.so(dmlc::StackTrace[abi:cxx11]()+0x55) [0x7f356e103585]
[bt] (1) /home/jan/R/x86_64-pc-linux-gnu-library/3.4/mxnet/libs/libmxnet.so(bool mxnet::op::ElemwiseAttr<nnvm::TShape, &mxnet::op::shape_is_none, &mxnet::op::shape_assign, true, &mxnet::op::shape_string[abi:cxx11], -1, -1>(nnvm::NodeAttrs const&, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, nnvm::TShape const&)::{lambda(std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, unsigned long, char const*)#1}::operator()(std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, unsigned long, char const*) const+0x12f9) [0x7f356e552bf9]
[bt] (2) /home/jan/R/x86_64-pc-linux-gnu

do you have any idea what the issue might be?

mawenlong2016 commented 6 years ago

We have tested the example (train_GSModel) in our DeepGS version 1.0 and found that it could be successfully procceed. The informations are as follows: Loading required namespace: mxnet Loading required package: mxnet [1] "the image size is equal with the original snp number" Start training with 1 devices [1] Train-mae=0.810270227050409 [2] Train-mae=0.808830445028143

The error message in your PC may due to your mxnet didn't installed successfully. Please make sure that you can run the short MXNetR example (https://mxnet.incubator.apache.org/install/index.html): library(mxnet) a <- mx.nd.ones(c(2,3), ctx = mx.gpu()) b <- a * 2 + 1 b

If you can't try the example, then you may try the following code to link your libmxnet.so sudo ldconfig /usr/local/cuda/lib64/

If you can run the example, then you may try our updated DeepGS Version 1.1. Run the example in the train_deepGSModel, you may got the informations as follows: Loading required namespace: mxnet Loading required package: mxnet Start training with 1 devices [1] Train-mae=0.805358654037991 [1] Validation-mae=0.82273542326875 [2] Train-mae=0.804309009046412 [2] Validation-mae=0.823836773245906

If you still can't run our DeepGS after the above steps, please upload the error message, and we will discuss how to solve it.

PastequeZ commented 6 years ago

Hi, I have successfully run library(mxnet) a <- mx.nd.ones(c(2,3), ctx = mx.gpu()) b <- a * 2 + 1 b and also tried version 1.1 but I still got the error: Start training with 1 devices Show Traceback

Rerun with Debug Error in mx.nd.internal.dispatch.Ops(.Generic, e1, e2) : [20:25:46] src/operator/nn/../tensor/../elemwise_op_common.h:123: Check failed: assign(&dattr, (*vec)[i]) Incompatible attr in node at 1-th input: expected [30], got [30,1]

Stack trace returned 10 entries: [bt] (0) 0 libmxnet.so 0x00000001156c70b5 dmlc::StackTrace() + 261 [bt] (1) 1 libmxnet.so 0x00000001156c6e6f dmlc::LogMessageFatal::~LogMessageFatal() + 47 [bt] (2) 2 libmxnet.so 0x0000000115827070 bool mxnet::op::ElemwiseAttr<nnvm::TShape, &(mxnet::op::shape_is_none(nnvm::TShape const&)), &(mxnet::op::shape_assign(nnvm::TShape, nnvm::TShape const&)), true, &(mxnet::op::shape_string(nnvm::TShape const&)), -1, -1>(nnvm::NodeAttrs const&, std::1::vector<nnvm::TShape, std::1::allocator >, std::1::vector<nnvm::TShape, std::1::allocator >, nnvm::TShape const&)::'lambda'(std::1::vector<nnvm::TShape, std::1::allocator >, unsigned long, char cons

Can you help me?

mawenlong2016 commented 6 years ago

In our example data, we did not contain any information about a size of 30. The warning "input: expected [30], got [30,1]" may be that the input phenotype must be a vector not a matrix.

Please send your codes and the used data to my email (mawenlong_nwsuaf@163.com) or you could update below (if you used our example data), and I will test your codes in my PC.

Please make sure that you tried our examples in the train_deepGSModel of DeepGS version 1.1: library(DeepGS) data(wheat_example) Markers <- wheat_example$Markers y <- wheat_example$y cvSampleList <- cvSampleIndex(length(y),10,1)

cvIdx <- 1 trainIdx <- cvSampleList[[cvIdx]]$trainIdx testIdx <- cvSampleList[[cvIdx]]$testIdx trainMat <- Markers[trainIdx,] trainPheno <- y[trainIdx] validIdx <- sample(1:length(trainIdx),floor(length(trainIdx)0.1)) validMat <- trainMat[validIdx,] validPheno <- trainPheno[validIdx] trainMat <- trainMat[-validIdx,] trainPheno <- trainPheno[-validIdx] conv_kernel <- c("118") ## convolution kernels (fileter shape) conv_stride <- c("11") conv_num_filter <- c(8) ## number of filters pool_act_type <- c("relu") ## active function for next pool pool_type <- c("max") ## max pooling shape pool_kernel <- c("14") ## pooling shape pool_stride <- c("1*4") ## number of pool kernerls fullayer_num_hidden <- c(32,1) fullayer_act_type <- c("sigmoid") drop_float <- c(0.2,0.1,0.05) cnnFrame <- list(conv_kernel =conv_kernel,conv_num_filter = conv_num_filter, conv_stride = conv_stride,pool_act_type = pool_act_type, pool_type = pool_type,pool_kernel =pool_kernel, pool_stride = pool_stride,fullayer_num_hidden= fullayer_num_hidden, fullayer_act_type = fullayer_act_type,drop_float = drop_float)

markerImage = paste0("1*",ncol(trainMat))

trainGSmodel <- train_deepGSModel(trainMat = trainMat,trainPheno = trainPheno, validMat = validMat,validPheno = validPheno, markerImage = markerImage, cnnFrame = cnnFrame,device_type = "cpu",gpuNum = 1, eval_metric = "mae", num_round = 6000,array_batch_size= 30,learning_rate = 0.01, momentum = 0.5,wd = 0.00001, randomseeds = 0,initializer_idx = 0.01)

You will get: Start training with 1 devices [1] Train-mae=0.805207145042126 [1] Validation-mae=0.822773229610175 [2] Train-mae=0.804317240615709 [2] Validation-mae=0.823776994412765

Best wishes.

PastequeZ commented 6 years ago

Thanks for your reply. Actually I was running your example. I tried your example again with the updated version above I still have error:

Error in symbol$infer.shape(list(...)) : Error in operator convolution0: [20:28:55] src/operator/nn/convolution.cc:194: Check failed: dilated_ksizex <= AddPad(dshape[3], param.pad[1]) (118 vs. 1) kernel size exceed input

Stack trace returned 10 entries: [bt] (0) 0 libmxnet.so 0x000000011267b0b5 dmlc::StackTrace() + 261 [bt] (1) 1 libmxnet.so 0x000000011267ae6f dmlc::LogMessageFatal::~LogMessageFatal() + 47 [bt] (2) 2 libmxnet.so 0x000000011281d4b1 mxnet::op::ConvolutionShape(nnvm::NodeAttrs const&, std::1::vector<nnvm::TShape, std::1::allocator >, std::1::vector<nnvm::TShape, std::1::allocator >) + 23377 [bt] (3) 3 libmxnet.so 0x00000001139a7b74 nnvm::Graph mxnet::exec::InferAttr<nnvm::TShape, std::1::function<bool (nnvm::NodeAttrs const&, std::1::vector<nnvm::TShape, std::1::allocator >*, std::1::vector<nnvm::TShape, std::__1::allocator


发件人: mawenlong2016 notifications@github.com 发送时间: 2018年4月28日 14:14 收件人: cma2015/DeepGS 抄送: PastequeZ; Comment 主题: Re: [cma2015/DeepGS] error when running the example (#2)

In our example data, we did not contain any information about a size of 30. The warning "input: expected [30], got [30,1]" may be that the input phenotype must be a vector not a matrix.

Please send your codes and the used data to my email (mawenlong_nwsuaf@163.commailto:mawenlong_nwsuaf@163.com) or you could update below (if you used our example data), and I will test your codes in my PC.

Please make sure that you tried our examples in the train_deepGSModel of DeepGS version 1.1: library(DeepGS) data(wheat_example) Markers <- wheat_example$Markers y <- wheat_example$y cvSampleList <- cvSampleIndex(length(y),10,1)

cvIdx <- 1 trainIdx <- cvSampleList[[cvIdx]]$trainIdx testIdx <- cvSampleList[[cvIdx]]$testIdx trainMat <- Markers[trainIdx,] trainPheno <- y[trainIdx] validIdx <- sample(1:length(trainIdx),floor(length(trainIdx)0.1)) validMat <- trainMat[validIdx,] validPheno <- trainPheno[validIdx] trainMat <- trainMat[-validIdx,] trainPheno <- trainPheno[-validIdx] conv_kernel <- c("118") ## convolution kernels (fileter shape) conv_stride <- c("11") conv_num_filter <- c(8) ## number of filters pool_act_type <- c("relu") ## active function for next pool pool_type <- c("max") ## max pooling shape pool_kernel <- c("14") ## pooling shape pool_stride <- c("1*4") ## number of pool kernerls fullayer_num_hidden <- c(32,1) fullayer_act_type <- c("sigmoid") drop_float <- c(0.2,0.1,0.05) cnnFrame <- list(conv_kernel =conv_kernel,conv_num_filter = conv_num_filter, conv_stride = conv_stride,pool_act_type = pool_act_type, pool_type = pool_type,pool_kernel =pool_kernel, pool_stride = pool_stride,fullayer_num_hidden= fullayer_num_hidden, fullayer_act_type = fullayer_act_type,drop_float = drop_float)

markerImage = paste0("1*",ncol(trainMat))

trainGSmodel <- train_deepGSModel(trainMat = trainMat,trainPheno = trainPheno, validMat = validMat,validPheno = validPheno, markerImage = markerImage, cnnFrame = cnnFrame,device_type = "cpu",gpuNum = 1, eval_metric = "mae", num_round = 6000,array_batch_size= 30,learning_rate = 0.01, momentum = 0.5,wd = 0.00001, randomseeds = 0,initializer_idx = 0.01)

You will get: Start training with 1 devices [1] Train-mae=0.805207145042126 [1] Validation-mae=0.822773229610175 [2] Train-mae=0.804317240615709 [2] Validation-mae=0.823776994412765

Best wishes.

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/cma2015/DeepGS/issues/2#issuecomment-385144386, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlAANyozavMwgAcr6QbsDVD8RTG-1e7Sks5ttAi3gaJpZM4TITfC.

mawenlong2016 commented 6 years ago

Thank you for your concerns.

Actually, the format of input data is strict. As we described, the trainPheno must be a vector of N*1, where N represents the individuals.

We had checked the possible reason, and found that the error may be the input format. In your first and second tries, you got: Error in mx.nd.internal.dispatch.Ops(.Generic, e1, e2) :
[11:41:33] src/operator/tensor/./../elemwise_op_common.h:123: Check failed: assign(&dattr, (vec)[i]) Incompatible attr in node at 1-th input: expected [100], got [100,1]
and Error in mx.nd.internal.dispatch.Ops(.Generic, e1, e2) :
[20:25:46] src/operator/nn/../tensor/../elemwise_op_common.h:123: Check failed: assign(&dattr, (
vec)[i]) Incompatible attr in node at 1-th input: expected [30], got [30,1]

This was because the size of trainPheno in your data was 1 100. When we reshape the trainPheno (change from 468 1 to 1 468) in our example data, we got the similar error: Error in exec$update.arg.arrays(arg.arrays, match.name, skip.null) : [11:04:07] src/operator/nn/../tensor/../elemwise_op_common.h:123: Check failed: assign(&dattr, (vec)[i]) Incompatible attr in node at 0-th output: expected [30], got [30,1].

So, please make sure that the trainMat must be a genotype matrix (N x M; N individuals, M markers) for training model, and the trainPheno must be a vector (N * 1) of phenotype for training mode. More details please see the Arguments section in our train_deepGSModel function description.

We apologized for not clearly checking the grammar two days ago, actually, some "" were missing after update our codes (conv_kernel <- c("1 18") not the conv_kernel <- c("118"), conv_stride <- c("1 1") not the conv_stride <- c("11"), pool_kernel <- c("1 4") not the pool_kernel <- c("14") ), the real type should be in our Examples section in our train_deepGSModel function description.

You may try the following (same with our Examples section in our train_deepGSModel function description): data(wheat_example)
Markers <- wheat_example$Markers
y <- wheat_example$y
cvSampleList <- cvSampleIndex(length(y),10,1)
cvIdx <- 1
trainIdx <- cvSampleList[[cvIdx]]$trainIdx
testIdx <- cvSampleList[[cvIdx]]$testIdx
trainMat <- Markers[trainIdx,]
trainPheno <- y[trainIdx]
validIdx <- sample(1:length(trainIdx),floor(length(trainIdx)0.1))
validMat <- trainMat[validIdx,]
validPheno <- trainPheno[validIdx]
trainMat <- trainMat[-validIdx,]
trainPheno <- trainPheno[-validIdx]
conv_kernel <- c("1
18") ## convolution kernels (fileter shape)
conv_stride <- c("1 1")
conv_num_filter <- c(8) ## number of filters
pool_act_type <- c("relu") ## active function for next pool
pool_type <- c("max") ## max pooling shape
pool_kernel <- c("1
4") ## pooling shape
pool_stride <- c("1 * 4") ## number of pool kernerls
fullayer_num_hidden <- c(32,1)
fullayer_act_type <- c("sigmoid")
drop_float <- c(0.2,0.1,0.05)
cnnFrame <- list(conv_kernel =conv_kernel,conv_num_filter = conv_num_filter,
conv_stride = conv_stride,pool_act_type = pool_act_type,
pool_type = pool_type,pool_kernel =pool_kernel,
pool_stride = pool_stride,fullayer_num_hidden= fullayer_num_hidden,
fullayer_act_type = fullayer_act_type,drop_float = drop_float)

markerImage = paste0("1*",ncol(trainMat))

trainGSmodel <- train_deepGSModel(trainMat = trainMat,trainPheno = trainPheno,
validMat = validMat,validPheno = validPheno, markerImage = markerImage,
cnnFrame = cnnFrame,device_type = "cpu",gpuNum = 1, eval_metric = "mae",
num_round = 6000,array_batch_size= 30,learning_rate = 0.01,
momentum = 0.5,wd = 0.00001, randomseeds = 0,initializer_idx = 0.01)

Additionally, the mxnet package had change several times, the current version we used is 1.2.0.

In summary, please check the input data format. If you still get errors, please update your codes and data, and we will check them detailed.

If you have GPU in your computer, you may change "device_type = "cpu"" to "device_type = "gpu"" to get a much more faster experience.

Best wishes.

PastequeZ commented 6 years ago

I ran exactly the same code as in your manual and above but I still got errors: Start training with 1 devices Error in mx.nd.internal.dispatch.Ops(.Generic, e1, e2) : [16:18:30] src/operator/nn/../tensor/../elemwise_op_common.h:123: Check failed: assign(&dattr, (*vec)[i]) Incompatible attr in node at 1-th input: expected [30], got [30,1]

Stack trace returned 10 entries: [bt] (0) 0 libmxnet.so 0x0000000114af5275 dmlc::StackTrace() + 261 [bt] (1) 1 libmxnet.so 0x0000000114af502f dmlc::LogMessageFatal::~LogMessageFatal() + 47 [bt] (2) 2 libmxnet.so 0x0000000114c55230 bool mxnet::op::ElemwiseAttr<nnvm::TShape, &(mxnet::op::shape_is_none(nnvm::TShape const&)), &(mxnet::op::shape_assign(nnvm::TShape, nnvm::TShape const&)), true, &(mxnet::op::shape_string(nnvm::TShape const&)), -1, -1>(nnvm::NodeAttrs const&, std::1::vector<nnvm::TShape, std::1::allocator >, std::1::vector<nnvm::TShape, std::1::allocator >, nnvm::TShape const&)::'lambda'(std::1::vector<nnvm::TShape, std::1::allocator >, unsigned long, char cons

My session info is R version 3.3.3 (2017-03-06) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: macOS 10.13.1

locale: [1] C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] DeepGS_1.1 mxnet_1.2.0 Matrix_1.2-8

loaded via a namespace (and not attached): [1] Rcpp_0.12.14 pillar_1.2.2 RColorBrewer_1.1-2 influenceR_0.1.0 plyr_1.8.4 bindr_0.1 [7] viridis_0.5.1 tools_3.3.3 digest_0.6.13 jsonlite_1.5 viridisLite_0.3.0 gtable_0.2.0 [13] tibble_1.4.2 lattice_0.20-34 rgexf_0.15.3 pkgconfig_2.0.1 rlang_0.2.0 igraph_1.1.2 [19] rstudioapi_0.7 bindrcpp_0.2 gridExtra_2.2.1 downloader_0.4 DiagrammeR_0.9.2 dplyr_0.7.4 [25] stringr_1.3.0 htmlwidgets_1.2 hms_0.4.2 grid_3.3.3 glue_1.2.0 R6_2.2.2 [31] Rook_1.1-1 XML_3.98-1.11 ggplot2_2.2.1 readr_1.1.1 purrr_0.2.4 tidyr_0.8.0 [37] magrittr_1.5 codetools_0.2-15 scales_0.5.0 htmltools_0.3.6 assertthat_0.2.0 colorspace_1.3-2 [43] brew_1.0-6 stringi_1.1.7 visNetwork_2.0.3 lazyeval_0.2.0 munsell_0.4.3

"input: expected [30], got [30,1]" dose it means the input should be 1N instead of N1?


发件人: mawenlong2016 notifications@github.com 发送时间: 2018年4月30日 11:39 收件人: cma2015/DeepGS 抄送: PastequeZ; Comment 主题: Re: [cma2015/DeepGS] error when running the example (#2)

Thank you for your concerns.

Actually, the format of input data is strict. As we described, the trainPheno must be a vector of N*1, where N represents the individuals.

We had checked the possible reason, and found that the error may be the input format. In your first and second tries, you got: Error in mx.nd.internal.dispatch.Ops(.Generic, e1, e2) : [11:41:33] src/operator/tensor/./../elemwise_op_common.h:123: Check failed: assign(&dattr, (vec)[i]) Incompatible attr in node at 1-th input: expected [100], got [100,1] and Error in mx.nd.internal.dispatch.Ops(.Generic, e1, e2) : [20:25:46] src/operator/nn/../tensor/../elemwise_op_common.h:123: Check failed: assign(&dattr, (vec)[i]) Incompatible attr in node at 1-th input: expected [30], got [30,1]

This was because the size of trainPheno in your data was 1 100. When we reshape the trainPheno (change from 468 1 to 1 468) in our example data, we got the similar error: Error in exec$update.arg.arrays(arg.arrays, match.name, skip.null) : [11:04:07] src/operator/nn/../tensor/../elemwise_op_common.h:123: Check failed: assign(&dattr, (vec)[i]) Incompatible attr in node at 0-th output: expected [30], got [30,1].

So, please make sure that the trainMat must be a genotype matrix (N x M; N individuals, M markers) for training model, and the trainPheno must be a vector (N * 1) of phenotype for training mode. More details please see the Arguments section in our train_deepGSModel function description.

We apologized for not clearly checking the grammar two days ago, actually, some "" were missing after update our codes (conv_kernel <- c("1 18") not the conv_kernel <- c("118"), conv_stride <- c("1 1") not the conv_stride <- c("11"), pool_kernel <- c("1 4") not the pool_kernel <- c("14") ), the real type should be in our Examples section in our train_deepGSModel function description.

You may try the following (same with our Examples section in our train_deepGSModel function description): data(wheat_example) Markers <- wheat_example$Markers y <- wheat_example$y cvSampleList <- cvSampleIndex(length(y),10,1) cvIdx <- 1 trainIdx <- cvSampleList[[cvIdx]]$trainIdx testIdx <- cvSampleList[[cvIdx]]$testIdx trainMat <- Markers[trainIdx,] trainPheno <- y[trainIdx] validIdx <- sample(1:length(trainIdx),floor(length(trainIdx)0.1)) validMat <- trainMat[validIdx,] validPheno <- trainPheno[validIdx] trainMat <- trainMat[-validIdx,] trainPheno <- trainPheno[-validIdx] conv_kernel <- c("1 18") ## convolution kernels (fileter shape) conv_stride <- c("1 1") conv_num_filter <- c(8) ## number of filters pool_act_type <- c("relu") ## active function for next pool pool_type <- c("max") ## max pooling shape pool_kernel <- c("1 4") ## pooling shape pool_stride <- c("1 * 4") ## number of pool kernerls fullayer_num_hidden <- c(32,1) fullayer_act_type <- c("sigmoid") drop_float <- c(0.2,0.1,0.05) cnnFrame <- list(conv_kernel =conv_kernel,conv_num_filter = conv_num_filter, conv_stride = conv_stride,pool_act_type = pool_act_type, pool_type = pool_type,pool_kernel =pool_kernel, pool_stride = pool_stride,fullayer_num_hidden= fullayer_num_hidden, fullayer_act_type = fullayer_act_type,drop_float = drop_float)

markerImage = paste0("1*",ncol(trainMat))

trainGSmodel <- train_deepGSModel(trainMat = trainMat,trainPheno = trainPheno, validMat = validMat,validPheno = validPheno, markerImage = markerImage, cnnFrame = cnnFrame,device_type = "cpu",gpuNum = 1, eval_metric = "mae", num_round = 6000,array_batch_size= 30,learning_rate = 0.01, momentum = 0.5,wd = 0.00001, randomseeds = 0,initializer_idx = 0.01)

Additionally, the mxnet package had change several times, the current version we used is 1.2.0.

In summary, please check the input data format. If you still get errors, please update your codes and data, and we will check them detailed.

If you have GPU in your computer, you may change "device_type = "cpu"" to "device_type = "gpu"" to get a much more faster experience.

Best wishes.

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/cma2015/DeepGS/issues/2#issuecomment-385308014, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlAAN4-HQ7G6aux-vi1HQrG1OF-9LBIHks5ttoeKgaJpZM4TITfC.

mawenlong2016 commented 6 years ago

Actually, we used Ubuntu 14.04 with GPUs to build our DeepGS.

To keep the same with your session, we re-test our DeepGS on mac os, the session info is: R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.3

We installed the mxnet by the following instruction (https://mxnet.incubator.apache.org/install/index.html): cran <- getOption("repos") cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/" options(repos = cran) install.packages("mxnet") After installed the DeepGS 1.1, the session infor is:

other attached packages: [1] DeepGS_1.1 mxnet_0.10.1

We should note that in mac os the precompiled version is mxnet 0.10.1(by default), however, in Ubuntu the complete version (we used) is mxnet 1.2.0 following the instruction (https://mxnet.incubator.apache.org/install/index.html).

We then run the code in our manual, and successfully conducted: Start training with 1 devices [1] Train-mae=0.800936881634091 [1] Validation-mae=0.883060586561138 [2] Train-mae=0.801303223080193 [2] Validation-mae=0.883761811396107

We apologized for not clearly describing system version, and we modify this system information in README.md. To stay the same with your mac os, we suggest that you should re-install the precompiled mxnet 0.10.1 instead of the complete mxnet 1.2.0.

Best wishes.

iimog commented 6 years ago

Hey, I had exactly the same problem as @PastequeZ with DeepGS 1.2, R 3.4.4, cuda 9.1, and mxnet 1.2.0

R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.4 LTS Matrix products: default BLAS: /usr/lib/openblas-base/libblas.so.3 LAPACK: /usr/lib/libopenblasp-r0.2.18.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] DeepGS_1.2 mxnet_1.2.0 loaded via a namespace (and not attached): [1] Rcpp_0.12.16 compiler_3.4.4 pillar_1.2.2 RColorBrewer_1.1-2 [5] influenceR_0.1.0 plyr_1.8.4 bindr_0.1.1 viridis_0.5.1 [9] tools_3.4.4 digest_0.6.15 jsonlite_1.5 tibble_1.4.2 [13] gtable_0.2.0 viridisLite_0.3.0 rgexf_0.15.3 pkgconfig_2.0.1 [17] rlang_0.2.0 igraph_1.2.1 rstudioapi_0.7 bindrcpp_0.2.2 [21] gridExtra_2.3 downloader_0.4 DiagrammeR_1.0.0 dplyr_0.7.4 [25] stringr_1.3.0 htmlwidgets_1.2 hms_0.4.2 grid_3.4.4 [29] glue_1.2.0 R6_2.2.2 Rook_1.1-1 XML_3.98-1.11 [33] readr_1.1.1 purrr_0.2.4 tidyr_0.8.0 ggplot2_2.2.1 [37] magrittr_1.5 codetools_0.2-15 scales_0.5.0 htmltools_0.3.6 [41] assertthat_0.2.0 colorspace_1.3-2 brew_1.0-6 stringi_1.1.7 [45] visNetwork_2.0.3 lazyeval_0.2.1 munsell_0.4.3

I was able to track the problem down to the implementation of the mae metric. @PastequeZ You can try to pass eval_metric = "rmse" in your call of train_deepGSModel() and see if that works. I was also able to use mae by changing line 95 in DeepGS/R/DeepGS.R from

                    mae = demo.metric.mae,

to

                    mae = mx.metric.mae,

as the mae metric seems to be part of the official mxnet package now.

Best, Markus

PastequeZ commented 6 years ago

Thanks a lot Markus!! It works now. I don't have to fight with mxnet 0.10.1 😊


发件人: Markus J. Ankenbrand notifications@github.com 发送时间: 2018年5月2日 19:55 收件人: cma2015/DeepGS 抄送: PastequeZ; Mention 主题: Re: [cma2015/DeepGS] error when running the example (#2)

Hey, I had exactly the same problem as @PastequeZhttps://github.com/PastequeZ with DeepGS 1.2, R 3.4.4, cuda 9.1, and mxnet 1.2.0

R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.4 LTS

Matrix products: default BLAS: /usr/lib/openblas-base/libblas.so.3 LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] DeepGS_1.2 mxnet_1.2.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.16 compiler_3.4.4 pillar_1.2.2 RColorBrewer_1.1-2 [5] influenceR_0.1.0 plyr_1.8.4 bindr_0.1.1 viridis_0.5.1 [9] tools_3.4.4 digest_0.6.15 jsonlite_1.5 tibble_1.4.2 [13] gtable_0.2.0 viridisLite_0.3.0 rgexf_0.15.3 pkgconfig_2.0.1 [17] rlang_0.2.0 igraph_1.2.1 rstudioapi_0.7 bindrcpp_0.2.2 [21] gridExtra_2.3 downloader_0.4 DiagrammeR_1.0.0 dplyr_0.7.4 [25] stringr_1.3.0 htmlwidgets_1.2 hms_0.4.2 grid_3.4.4 [29] glue_1.2.0 R6_2.2.2 Rook_1.1-1 XML_3.98-1.11 [33] readr_1.1.1 purrr_0.2.4 tidyr_0.8.0 ggplot2_2.2.1 [37] magrittr_1.5 codetools_0.2-15 scales_0.5.0 htmltools_0.3.6 [41] assertthat_0.2.0 colorspace_1.3-2 brew_1.0-6 stringi_1.1.7 [45] visNetwork_2.0.3 lazyeval_0.2.1 munsell_0.4.3

I was able to track the problem down to the implementation of the mae metric. @PastequeZhttps://github.com/PastequeZ You can try to pass eval_metric = "rmse" in your call of train_deepGSModel() and see if that works. I was also able to use mae by changing line 95 in DeepGS/R/DeepGS.R from

                mae = demo.metric.mae,

to

                mae = mx.metric.mae,

as the mae metric seems to be part of the official mxnet package now.

Best, Markus

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/cma2015/DeepGS/issues/2#issuecomment-385952836, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlAAN3t0_VZi49OrYQHpDdecV1tD4t4Oks5tuZ6_gaJpZM4TITfC.