AI-MXNet
view release on metacpan or search on metacpan
- LR Scheduler bugfix.
0.9503 Wed Apr 19 13:33:57 PDT 2017
- added an example of generation of inferred text via pre-trained RNN.
- bugfixes/tests.
0.9502 Sat Apr 15 17:18:21 PDT 2017
- optimizations/bugfixes.
0.9501 Sat Apr 8 13:01:00 PDT 2017
- ZoneoutCell, nd inferred reshape and moveaxis, cosmetic changes to Image iter,
pod reworked to be readable via metacpan.
0.95 Sun Mar 26 17:42:02 PDT 2017
- docs, bugfixes, tests in order to be visible on http://mxnet.io
0.03 Tue Feb 14 07:28:11 PST 2017
- sync up with current state of the Python inteface.
- high level RNN support.
0.02 Tue Feb 14 07:28:11 PST 2017
lib/AI/MXNet/Executor.pm view on Meta::CPAN
$new_arg_dict{ $name } = $arr->reshape($new_shape);
if(defined $darr)
{
$new_grad_dict{ $name } = $darr->reshape($new_shape);
}
}
}
else
{
confess(
"Shape of unspecified array arg:$name changed. "
."This can cause the new executor to not share parameters "
."with the old one. Please check for error in network."
."If this is intended, set partial_shaping=True to suppress this warning."
);
}
$i++;
}
my %new_aux_dict;
$i = 0;
for my $name (@{ $self->_symbol->list_auxiliary_states() })
lib/AI/MXNet/Executor.pm view on Meta::CPAN
);
}
else
{
$new_aux_dict{ $name } = $arr->reshape($new_shape);
}
}
else
{
confess(
"Shape of unspecified array aux:$name changed. "
."This can cause the new executor to not share parameters "
."with the old one. Please check for error in network."
."If this is intended, set partial_shaping=True to suppress this warning."
);
}
$i++;
}
return $self->_symbol->bind(
ctx => $self->_ctx,
args => \%new_arg_dict,
lib/AI/MXNet/KVStore.pm view on Meta::CPAN
my $data;
{ local($/) = undef; $data = <F>; }
close(F);
$self->_updater->set_states($data);
}
=head2 _set_updater
Set a push updater into the store.
This function only changes the local store. Use set_optimizer for
multi-machines.
Parameters
----------
updater : function
the updater function
Examples
--------
>>> my $update = sub { my ($key, input, stored) = @_;
lib/AI/MXNet/LRScheduler.pm view on Meta::CPAN
use overload "&{}" => sub { my $self = shift; sub { $self->call(@_) } },
fallback => 1;
=head1 NAME
AI::MXNet::LRScheduler - The adaptive scheduler of the learning rate.
=cut
=head1 DESCRIPTION
Learning rate scheduler, which adaptively changes the learning rate based on the
progress.
=cut
=head2 new
base_lr : float (optional, default 0.01)
the initial learning rate
=cut
has 'base_lr' => (is => 'rw', isa => 'Num', default => 0.01);
lib/AI/MXNet/LRScheduler.pm view on Meta::CPAN
# NOTE: use while rather than if (for continuing training via load_epoch)
while($num_update > $self->count + $self->step)
{
$self->count($self->count + $self->step);
$self->base_lr($self->base_lr * $self->factor);
if($self->base_lr < $self->stop_factor_lr)
{
$self->base_lr($self->stop_factor_lr);
AI::MXNet::Logging->info(
"Update[%d]: now learning rate arrived at %0.5e, will not "
."change in the future", $num_update, $self->base_lr
);
}
else
{
AI::MXNet::Logging->info(
"Update[%d]: Changed learning rate to %0.5e",
$num_update, $self->base_lr
);
}
}
lib/AI/MXNet/Module/Bucketing.pm view on Meta::CPAN
# copy back saved params, if already initialized
if($self->params_initialized)
{
$self->set_params($arg_params, $aux_params);
}
}
=head2 switch_bucket
Switch to a different bucket. This will change $self->_curr_module.
Parameters
----------
:$bucket_key : str (or any perl object that overloads "" op)
The key of the target bucket.
:$data_shapes : Maybe[ArrayRef[AI::MXNet::DataDesc|NameShape]]
Typically $data_batch->provide_data.
:$label_shapes : Maybe[ArrayRef[AI::MXNet::DataDesc|NameShape]]
Typically $data_batch->provide_label.
=cut
lib/AI/MXNet/Symbol/AttrScope.pm view on Meta::CPAN
};
=head1 NAME
AI::MXNet::Symbol::AttrScope - Attribute manager for local scoping.
=head1 DESCRIPTION
Attribute manager for scoping.
User can also inherit this object to change naming behavior.
Parameters
----------
kwargs
The attributes to set for all symbol creations in the scope.
=cut
has 'attr' => (
is => 'ro',
isa => 'HashRef[Str]',
lib/AI/MXNet/Symbol/NameManager.pm view on Meta::CPAN
package AI::MXNet::Symbol::NameManager;
use strict;
use warnings;
use Mouse;
use AI::MXNet::Function::Parameters;
=head1
NameManager that does an automatic naming.
A user can also inherit this object to change the naming behavior.
=cut
has 'counter' => (
is => 'ro',
isa => 'HashRef',
default => sub { +{} }
);
our $current;
( run in 0.436 second using v1.01-cache-2.11-cpan-5dc5da66d9d )