Context
#
MXNet.mx.Context — Type.
Context(dev_type, dev_id)
A context describes the device type and id on which computation should be carried on.
#
MXNet.mx.cpu — Function.
cpu(dev_id)
Get a CPU context with a specific id. cpu() is usually the default context for many operations when no context is specified.
Arguments
dev_id::Int = 0: the CPU id.
#
MXNet.mx.gpu — Function.
gpu(dev_id)
Get a GPU context with a specific id. The K GPUs on a node is typically numbered as 0,...,K-1.
Arguments
dev_id :: Int = 0the GPU device id.