AI::MXNet::Contrib - An interface to experimental operators defined in C++ space.
my $embed; if($sparse_embedding) { my $embed_weight = mx->sym->Variable('embed_weight', stype=>'row_sparse'); $embed = mx->sym->contrib->SparseEmbedding( data=>$data, input_dim=>$num_words, weight=>$embed_weight, output_dim=>$num_embed, name=>'embed' ); } else { $embed = mx->sym->Embedding( data=>$data, input_dim=>$num_words, output_dim=>$num_embed, name=>'embed' ); }
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.