module MXNet
Overview
This library is built on top of the core packages NDArray
and
Symbol
.
NDArray
works with arrays in an imperative fashion, i.e. you
define how arrays will be transformed to get to an end
result. Symbol
works with arrays in a declarative fashion,
i.e. you define the end result that is required (via a symbolic
graph) and the MXNet engine will use various optimizations to
determine the steps required to obtain this. With NDArray
you have
a great deal of flexibility when composing operations, and you can
easily step through your code and inspect the values of arrays,
which helps with debugging. Unfortunately, this flexibility comes at
a performance cost when compared to Symbol
, which can perform
optimizations on the symbolic graph.
Defined in:
mxnet.crmxnet/autograd.cr
mxnet/base.cr
mxnet/cached_op.cr
mxnet/context.cr
mxnet/executor.cr
mxnet/gluon.cr
mxnet/gluon/block.cr
mxnet/gluon/data.cr
mxnet/gluon/data/data_loader.cr
mxnet/gluon/data/dataset.cr
mxnet/gluon/data/sampler.cr
mxnet/gluon/data/vision/mnist.cr
mxnet/gluon/loss.cr
mxnet/gluon/nn.cr
mxnet/gluon/nn/activations.cr
mxnet/gluon/nn/layers.cr
mxnet/gluon/parameter.cr
mxnet/gluon/trainer.cr
mxnet/gluon/utils.cr
mxnet/initializer.cr
mxnet/libmxnet.cr
mxnet/name/manager.cr
mxnet/ndarray.cr
mxnet/operations.cr
mxnet/optimizer.cr
mxnet/random.cr
mxnet/symbol.cr
mxnet/util.cr
Constant Summary
-
VERSION =
"0.2.0"
Class Method Summary
-
.cpu(device_id : Int32 = 0)
Returns a CPU context.
-
.gpu(device_id : Int32 = 0)
Returns a GPU context.
Class Method Detail
Returns a CPU context.
This function is equivalent to MXNet::Context.cpu
.
Parameters
- device_id (
Int32
, default = 0) Device id of the device. Not required for the CPU context. Included to make the interface compatible with GPU contexts.
Returns a GPU context.
This function is equivalent to MXNet::Context.gpu
.
Parameters
- device_id (
Int32
, default = 0) Device id of the device. Required for the GPU contexts.