How works with mxnet without cuda in windows using R

So i run this script
model <- mx.model.FeedForward.create(
X = train,
eval.data = val,
ctx = mx.gpu(),
symbol = captcha_net,
eval.metric = mx.metric.acc2,
num.round = 10,
learning.rate = 0.0001,
momentum = 0.9,
wd = 0.00001,
batch.end.callback = mx.callback.log.train.metric(50),
initializer = mx.init.Xavier(factor_type = “in”, magnitude = 2.34),
optimizer = “sgd”,
clip_gradient = 10
)

error
Error in mx.nd.internal.empty.array(shape, ctx) :
[16:33:54] C:\Jenkins\workspace\mxnet\mxnet\src\storage\storage.cc:137: Compile with USE_CUDA=1 to enable GPU usage

it is seems

  1. there is no cuda, my card is not nvidia
    2 trouble in this row ctx = mx.gpu()

So how can i install cuda on windows without nvidia card?

or how can i change this row trouble in this row ctx = mx.gpu() to script work?

I understood what the problem. I don’t have Nvidia card, so i must use MXnet only CPU and not GPU
like this
model <- mx.model.FeedForward.create(
X = train,
eval.data = val,
ctx = mx.cpu(),
symbol = captcha_net,
eval.metric = mx.metric.acc2,
num.round = 10,
learning.rate = 0.0001,
momentum = 0.9,
wd = 0.00001,
batch.end.callback = mx.callback.log.train.metric(50),
initializer = mx.init.Xavier(factor_type = “in”, magnitude = 2.34),
optimizer = “sgd”,
clip_gradient = 10
)

1 Like

Thanks @Data_Miner, indeed the ctx argument, standing for Compute Context defines where the memory and computation should take place. If you have installed a CPU-only version of MXNet, trying to use a GPU context will result in an error.