NeuralLayer

Abstract base class of all layers in the net.

Constructors

this
this()
Undocumented in source.
this
this(ulong dim_out_, LayerT type_)
Undocumented in source.

Members

Functions

accumulate_grad
void accumulate_grad(float[] grad)
Undocumented in source. Be warned that the author may not have intended to support it.
accumulate_grad
void accumulate_grad(SparseF[] grad)
Undocumented in source. Be warned that the author may not have intended to support it.
allocate_grad_params
void allocate_grad_params()
Undocumented in source. Be warned that the author may not have intended to support it.
allocate_interface
void allocate_interface()
Undocumented in source. Be warned that the author may not have intended to support it.
allocate_params
void allocate_params()
Undocumented in source. Be warned that the author may not have intended to support it.
backward_prop
void backward_prop(V[] grad)
Undocumented in source. Be warned that the author may not have intended to support it.
deser
void deser(Serializer s)
Undocumented in source. Be warned that the author may not have intended to support it.
deserialize
void deserialize(Serializer s)
Undocumented in source. Be warned that the author may not have intended to support it.
dup
NeuralLayer dup()
Undocumented in source. Be warned that the author may not have intended to support it.
forward_prop
void forward_prop()
Undocumented in source. Be warned that the author may not have intended to support it.
init
void init(double random_scale)
Undocumented in source. Be warned that the author may not have intended to support it.
post_learning
void post_learning()
Undocumented in source. Be warned that the author may not have intended to support it.
pre_learning
void pre_learning()
Undocumented in source. Be warned that the author may not have intended to support it.
predict
void predict()
Undocumented in source.
recompute_topology
void recompute_topology()
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset()
Undocumented in source. Be warned that the author may not have intended to support it.
ser
void ser(Serializer s)
Undocumented in source. Be warned that the author may not have intended to support it.
serialize
void serialize(Serializer s)
Undocumented in source. Be warned that the author may not have intended to support it.
set_name
void set_name(string name_)
Undocumented in source. Be warned that the author may not have intended to support it.
set_optimizer
void set_optimizer(Optimizer opt_)
Undocumented in source. Be warned that the author may not have intended to support it.
set_type
void set_type(LayerT t)
Undocumented in source. Be warned that the author may not have intended to support it.
share_params
void share_params(NeuralLayer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

learnable
bool learnable [@property getter]

whether or not this layer has any parameters to be learnt

num_params
ulong num_params [@property getter]
Undocumented in source.
optimizer_set
optimizer_set [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

not_learnable_branch
bool not_learnable_branch(NeuralLayer layer)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_learnable
bool _learnable;
Undocumented in source.
backgrads
float[][] backgrads;

array of gradients to backpropagate to parents

children
NeuralLayer[] children;

array referencing all the children of this layer

dim_in
size_t dim_in;

total input dimension of this layer (sum of output dimensions of its parents)

dim_out
size_t dim_out;

total output dimension of this layer

name
string name;
optimizer
Optimizer optimizer;
Undocumented in source.
out_d
float[] out_d;

dense output vector of this layer (might be unused)

out_s
SparseF[] out_s;

sparse output vector of this layer (might be unused)

parents
NeuralLayer[] parents;

array referencing all the parents of this layer

type
LayerT type;

Meta