|
OpenNN
Open-source neural networks library
|
Go to the source code of this file.
Namespaces | |
| namespace | opennn |
Functions | |
| void | opennn::pad (const TensorView &input, TensorView &output) |
| Pads the input tensor and writes the result into output. | |
| void | opennn::bound (const TensorView &input, const TensorView &lower_bounds, const TensorView &upper_bounds, TensorView &output) |
| Clamps each element of input to the [lower_bounds, upper_bounds] range. | |
| void | opennn::bound_cpu (const TensorView &input, const TensorView &lower_bounds, const TensorView &upper_bounds, TensorView &output) |
| CPU implementation of bound(). | |
| void | opennn::scale (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| Applies per-feature scaling (mean/std, min/max, or other scalers) to a tensor. | |
| void | opennn::scale_cpu (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| CPU implementation of scale(). | |
| void | opennn::unscale (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| Inverse of scale(); reconstructs original values from a previously scaled tensor. | |
| void | opennn::unscale_cpu (const TensorView &input, const TensorView &minimums, const TensorView &maximums, const TensorView &means, const TensorView &standard_deviations, const TensorView &scalers, float min_range, float max_range, TensorView &output) |
| CPU implementation of unscale(). | |
| void | opennn::copy (const TensorView &source, TensorView &destination) |
| Copies the contents of source into destination, dispatching to CPU or GPU as needed. | |
| void | opennn::copy_cpu (const TensorView &source, TensorView &destination) |
| CPU implementation of copy(). | |
| void | opennn::add (const TensorView &input_1, const TensorView &input_2, TensorView &output) |
| Element-wise addition: output = input_1 + input_2. | |
| void | opennn::add_cpu (const TensorView &input_1, const TensorView &input_2, TensorView &output) |
| CPU implementation of add(). | |
| void | opennn::multiply (const TensorView &input_a, bool transpose_a, const TensorView &input_b, bool transpose_b, TensorView &output, float alpha=1.0f, float beta=0.0f) |
| General matrix multiply: output = alpha * op(input_a) * op(input_b) + beta * output. | |
| void | opennn::multiply_cpu (const TensorView &input_a, bool transpose_a, const TensorView &input_b, bool transpose_b, TensorView &output, float alpha=1.0f, float beta=0.0f) |
| CPU implementation of multiply(). | |
| void | opennn::softmax (TensorView &output) |
| Applies softmax in place along the trailing dimension of output. | |
| void | opennn::softmax_cpu (TensorView &output) |
| CPU implementation of softmax(). | |
| void | opennn::max_pooling_3d_forward (const TensorView &input, TensorView &output, TensorView &maximal_indices, bool is_training) |
| Forward pass of 3D max pooling; records argmax positions when training. | |
| void | opennn::max_pooling_3d_forward_cpu (const TensorView &input, TensorView &output, TensorView &maximal_indices, bool is_training) |
| CPU implementation of max_pooling_3d_forward(). | |
| void | opennn::average_pooling_3d_forward (const TensorView &input, TensorView &output) |
| Forward pass of 3D average pooling. | |
| void | opennn::average_pooling_3d_forward_cpu (const TensorView &input, TensorView &output) |
| CPU implementation of average_pooling_3d_forward(). | |
| void | opennn::max_pooling_3d_backward (const TensorView &maximal_indices, const TensorView &output_delta, TensorView &input_delta) |
| Backward pass for 3D max pooling; routes gradients to argmax positions. | |
| void | opennn::max_pooling_3d_backward_cpu (const TensorView &maximal_indices, const TensorView &output_delta, TensorView &input_delta) |
| CPU implementation of max_pooling_3d_backward(). | |
| void | opennn::average_pooling_3d_backward (const TensorView &input, const TensorView &output_delta, TensorView &input_delta) |
| Backward pass for 3D average pooling. | |
| void | opennn::average_pooling_3d_backward_cpu (const TensorView &input, const TensorView &output_delta, TensorView &input_delta) |
| CPU implementation of average_pooling_3d_backward(). | |
| void | opennn::split_heads (const TensorView &source, TensorView &destination) |
| Reshapes a multi-head attention tensor by splitting the last axis into heads. | |
| void | opennn::split_heads_cpu (const TensorView &source, TensorView &destination) |
| CPU implementation of split_heads(). | |
| void | opennn::merge_heads (const TensorView &source, TensorView &destination) |
| Inverse of split_heads(); merges per-head tensors back into a single representation. | |
| void | opennn::merge_heads_cpu (const TensorView &source, TensorView &destination) |
| CPU implementation of merge_heads(). | |