-1

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

Shiv
  • 369
  • 2
  • 13

1 Answers1

0

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

Shiv
  • 369
  • 2
  • 13