39 enum Backward {OutputDelta, InputDelta0, InputDelta1};
void set(const Shape &, const string &)
Reconfigures the layer with a new input shape and label.
vector< TensorSpec > get_backward_specs(Index batch_size) const override
Returns the tensor specs of intermediate backward buffers for a given batch size.
Shape get_output_shape() const override
Returns the output shape; subclasses must implement this to expose their geometry.
Definition addition_layer.h:25
void set_input_shape(const Shape &shape) override
Sets the input shape; subclasses override to derive dependent dimensions.
Definition addition_layer.h:33
Addition(const Shape &={}, const string &="")
Constructs an addition layer for the given input shape and label.
string label
Definition layer.h:250
Shape input_shape
Definition layer.h:256
Definition adaptive_moment_estimation.h:14
void add(const TensorView &input_1, const TensorView &input_2, TensorView &output)
Element-wise addition: output = input_1 + input_2.
Element-wise sum of several input tensors (used by residual connections).
Definition operators.h:110
Fixed-capacity small-vector describing tensor dimensions (rank up to MaxRank).
Definition tensor_utilities.h:42