Follwoing works fine on windows although throws error on Linux
core <- 5
ctx <- lapply(c(1:core), function(i) {mx.cpu(i)})
The model function is "mx.model.FeedForward.create"
The error is "Error in (function (symbol, ctx, grad.req = "null", ...) : Need more shape information to decide the shapes of arguments"
Although, it works properly when core <- 1
Here is solution.
First set the environment variable
Sys.setenv(MXNET_CPU_WORKER_NTHREADS = core);
Use ctx= mx.cpu() depending upon cpu/gpu
It is working on both Windows and Linux