AI-MXNet
view release on metacpan or search on metacpan
lib/AI/MXNet/Base.pm view on Meta::CPAN
=cut
sub check_call
{
Carp::confess(AI::MXNetCAPI::GetLastError()) if shift;
return wantarray ? @_ : $_[0];
}
=head2 build_param_doc
Builds argument docs in python style.
arg_names : array ref of str
Argument names.
arg_types : array ref of str
Argument type information.
arg_descs : array ref of str
Argument description information.
lib/AI/MXNet/Visualization.pm view on Meta::CPAN
my $interals = $symbol->get_internals;
my (undef, $out_shapes, undef) = $interals->infer_shape(%{ $shape });
Carp::confess("Input shape is incomplete")
unless defined $out_shapes;
@shape_dict{ @{ $interals->list_outputs } } = @{ $out_shapes };
}
my $conf = decode_json($symbol->tojson);
my $nodes = $conf->{nodes};
my %node_attr = (
qw/ shape box fixedsize true
width 1.3 height 0.8034 style filled/,
%{ $node_attrs }
);
my $dot = AI::MXNet::Visualization::PythonGraphviz->new(
graph => GraphViz->new(name => $title),
format => $save_format
);
# color map
my @cm = (
"#8dd3c7", "#fb8072", "#ffffb3", "#bebada", "#80b1d3",
"#fdb462", "#b3de69", "#fccde5"
( run in 0.510 second using v1.01-cache-2.11-cpan-49f99fa48dc )