gluonts.mx.context module

class gluonts.mx.context.MXContext[source]

Bases: object

Defines custom data type validation for the Context data type.

classmethod validate(v: Union[str, mxnet.context.Context]) → mxnet.context.Context[source]
gluonts.mx.context.check_gpu_support() → bool[source]

Emits a log line and returns a boolean that indicate whether the currently installed MXNet version has GPU support.

gluonts.mx.context.get_mxnet_context[source]

Returns either CPU or GPU context

gluonts.mx.context.num_gpus(refresh=False)[source]