AI::MXNet::Context - A device context.
This class governs the device context of AI::MXNet::NDArray objects.
Constructing a context. Parameters ---------- device_type : {'cpu', 'gpu'} or Context. String representing the device type device_id : int (default=0) The device id of the device, needed for GPU
Returns a CPU context. Parameters ---------- device_id : int, optional The device id of the device. device_id is not needed for CPU. This is included to make interface compatible with GPU. Returns ------- context : AI::MXNet::Context The corresponding CPU context.
Returns a GPU context. Parameters ---------- device_id : int, optional Returns ------- context : AI::MXNet::Context The corresponding GPU context.
Returns the current context. Returns ------- $default_ctx : AI::MXNet::Context
To install AI::MXNet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AI::MXNet
CPAN shell
perl -MCPAN -e shell install AI::MXNet
For more information on module installation, please visit the detailed CPAN module installation guide.