DropOut

DropOut layer accepting all dense or all sparse parents.

Features rescaling happens automatically at training time.

Constructors

this
this()
Undocumented in source.
this
this(float drop_rate)
Undocumented in source.

Members

Functions

_acc_grad_dense
void _acc_grad_dense(float[] grad)
Undocumented in source. Be warned that the author may not have intended to support it.
_acc_grad_sparse
void _acc_grad_sparse(float[] grad)
Undocumented in source. Be warned that the author may not have intended to support it.
_predict_dense
void _predict_dense()
Undocumented in source. Be warned that the author may not have intended to support it.
_predict_sparse
void _predict_sparse()
Undocumented in source. Be warned that the author may not have intended to support it.
_predict_train_dense
void _predict_train_dense()
Undocumented in source. Be warned that the author may not have intended to support it.
_predict_train_sparse
void _predict_train_sparse()
Undocumented in source. Be warned that the author may not have intended to support it.
accumulate_grad
void accumulate_grad(float[] grad)
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.
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. Be warned that the author may not have intended to support it.
recompute_topology
void recompute_topology()
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_drop_rate
void set_drop_rate(float rate)
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.

Mixins

__anonymous
mixin opCallNew
Undocumented in source.

Properties

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

Variables

_acc_grad
void delegate(float[]) _acc_grad;
Undocumented in source.
_drop_rate
float _drop_rate;
Undocumented in source.
_predict
void delegate() _predict;
Undocumented in source.
_scale_ratio
float _scale_ratio;
Undocumented in source.

Mixed In Members

From mixin opCallNew

opCall
auto opCall(T args)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From NeuralLayer

name
string name;
type
LayerT type;
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

children
NeuralLayer[] children;

array referencing all the children of this layer

parents
NeuralLayer[] parents;

array referencing all the parents of this layer

_learnable
bool _learnable;
Undocumented in source.
learnable
bool learnable [@property getter]

whether or not this layer has any parameters to be learnt

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)

backgrads
float[][] backgrads;

array of gradients to backpropagate to parents

init
void init(double random_scale)
Undocumented in source. Be warned that the author may not have intended to support it.
predict
void predict()
Undocumented in source.
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.
num_params
ulong num_params [@property getter]
Undocumented in source.
dup
NeuralLayer dup()
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.
allocate_grad_params
void allocate_grad_params()
Undocumented in source. Be warned that the author may not have intended to support it.
optimizer
Optimizer optimizer;
Undocumented in source.
optimizer_set
optimizer_set [@property getter]
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.
forward_prop
void forward_prop()
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.
set_optimizer
void set_optimizer(Optimizer opt_)
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.
set_name
void set_name(string name_)
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.
deser
void deser(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.
deserialize
void deserialize(Serializer s)
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.
post_learning
void post_learning()
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.
recompute_topology
void recompute_topology()
Undocumented in source. Be warned that the author may not have intended to support it.
not_learnable_branch
bool not_learnable_branch(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.

Examples

auto l = DropOut(0.3); // Drop 30% of the input neurons at random.

Meta