|
Expression Templates Library (ETL)
|
Contains some special helpers for machine learning. More...


Go to the source code of this file.
Functions | |
| template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B> | |
| conv_4d_valid_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > | etl::ml::convolution_forward (A &&a, B &&b) |
| Forward convolution for a batch of images with a set of kernels. More... | |
| template<etl_expr A, etl_expr B> | |
| dyn_conv_4d_valid_expr< detail::build_type< A >, detail::build_type< B >, true > | etl::ml::convolution_forward (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0) |
| Forward convolution for a batch of images with a set of kernels. More... | |
| template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B> | |
| conv_4d_backward_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > | etl::ml::convolution_backward (A &&a, B &&b) |
| Backward convolution for a batch of images with a set of kernels. More... | |
| template<etl_expr A, etl_expr B> | |
| dyn_conv_4d_backward_expr< detail::build_type< A >, detail::build_type< B >, true > | etl::ml::convolution_backward (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0) |
| Backward convolution for a batch of images with a set of kernels. More... | |
| template<size_t S1 = 1, size_t S2 = 1, size_t P1 = 0, size_t P2 = 0, etl_expr A, etl_expr B> | |
| conv_4d_backward_filter_expr< detail::build_type< A >, detail::build_type< B >, S1, S2, P1, P2, true > | etl::ml::convolution_backward_filter (A &&a, B &&b) |
| Backward convolution for a batch of images with a set of kernels. More... | |
| template<etl_expr A, etl_expr B> | |
| dyn_conv_4d_backward_filter_expr< detail::build_type< A >, detail::build_type< B >, true > | etl::ml::convolution_backward_filter (A &&a, B &&b, size_t s1, size_t s2, size_t p1=0, size_t p2=0) |
| Backward convolution for a batch of images with a set of kernels. More... | |
| template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, typename E > | |
| auto | etl::ml::max_pool_forward (E &&value) |
| Forward 2D Max Pooling of the given matrix expression. More... | |
| template<typename E > | |
| auto | etl::ml::max_pool_forward (E &&value, size_t c1, size_t c2) |
| Forward 2D Max Pooling of the given matrix expression. More... | |
| template<typename E > | |
| auto | etl::ml::max_pool_forward (E &&value, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0) |
| Forward 2D Max Pooling of the given matrix expression. More... | |
| template<size_t C1, size_t C2, size_t C3, typename E > | |
| auto | etl::ml::max_pool_3d_forward (E &&value) |
| Forward 3D Max Pooling of the given matrix expression. More... | |
| template<typename E > | |
| auto | etl::ml::max_pool_3d_forward (E &&value, size_t c1, size_t c2, size_t c3) |
| Forward 3D Max Pooling of the given matrix expression. More... | |
| template<size_t C1, size_t C2, size_t S1 = C1, size_t S2 = C2, size_t P1 = 0, size_t P2 = 0, typename E > | |
| auto | etl::ml::avg_pool_forward (E &&value) |
| Forward Average Pooling of the given matrix expression. More... | |
| template<typename E > | |
| auto | etl::ml::avg_pool_forward (E &&value, size_t c1, size_t c2) |
| 2D Average Pooling of the given matrix expression More... | |
| template<typename E > | |
| auto | etl::ml::avg_pool_forward (E &&value, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0) |
| 2D Average Pooling of the given matrix expression More... | |
| template<size_t C1, size_t C2, size_t C3, typename E > | |
| auto | etl::ml::avg_pool_3d_forward (E &&value) |
| Forward 3D Average Pooling of the given matrix expression. More... | |
| template<typename E > | |
| auto | etl::ml::avg_pool_3d_forward (E &&value, size_t c1, size_t c2, size_t c3) |
| Forward 3D Average Pooling of the given matrix expression. More... | |
| template<size_t C1, size_t C2, size_t S1, size_t S2, size_t P1, size_t P2, etl_expr A, etl_expr B, typename C > | |
| pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, S1, S2, P1, P2, true > | etl::ml::max_pool_backward (A &&input, B &&output, C &&errors) |
| Derivative of the 2D Max Pooling of the given matrix expression and upsampling. More... | |
| template<etl_expr A, etl_expr B, typename C > | |
| dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, true > | etl::ml::max_pool_backward (A &&input, B &&output, C &&errors, size_t c1, size_t c2) |
| Derivative of the 2D Max Pooling of the given matrix expression and upsampling. More... | |
| template<etl_expr A, etl_expr B, typename C > | |
| dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, true > | etl::ml::max_pool_backward (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0) |
| Derivative of the 2D Max Pooling of the given matrix expression and upsampling. More... | |
| template<size_t C1, size_t C2, size_t C3, etl_expr A, etl_expr B, typename C > | |
| pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, C3, true > | etl::ml::max_pool_3d_backward (A &&input, B &&output, C &&errors) |
| Derivative of the 3D Max Pooling of the given matrix expression and upsampling. More... | |
| template<etl_expr A, etl_expr B, typename C > | |
| dyn_pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, true > | etl::ml::max_pool_3d_backward (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t c3) |
| Derivative of the 3D Max Pooling of the given matrix expression and upsampling. More... | |
| template<size_t C1, size_t C2, size_t S1, size_t S2, size_t P1, size_t P2, etl_expr A, etl_expr B, typename C > | |
| pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, S1, S2, P1, P2, false > | etl::ml::avg_pool_backward (A &&input, B &&output, C &&errors) |
| Derivative of the 2D Avg Pooling of the given matrix expression and upsampling. More... | |
| template<etl_expr A, etl_expr B, typename C > | |
| dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, false > | etl::ml::avg_pool_backward (A &&input, B &&output, C &&errors, size_t c1, size_t c2) |
| Derivative of the 2D Average Pooling of the given matrix expression and upsampling. More... | |
| template<etl_expr A, etl_expr B, typename C > | |
| dyn_pool_upsample_2d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, false > | etl::ml::avg_pool_backward (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t s1, size_t s2, size_t p1=0, size_t p2=0) |
| Derivative of the 2D Average Pooling of the given matrix expression and upsampling. More... | |
| template<size_t C1, size_t C2, size_t C3, etl_expr A, etl_expr B, typename C > | |
| pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, C1, C2, C3, false > | etl::ml::avg_pool_3d_backward (A &&input, B &&output, C &&errors) |
| Derivative of the 2D Avg Pooling of the given matrix expression and upsampling. More... | |
| template<etl_expr A, etl_expr B, typename C > | |
| dyn_pool_upsample_3d_expr< detail::build_type< A >, detail::build_type< B >, detail::build_type< C >, false > | etl::ml::avg_pool_3d_backward (A &&input, B &&output, C &&errors, size_t c1, size_t c2, size_t c3) |
| Derivative of the 2D Average Pooling of the given matrix expression and upsampling. More... | |
| template<typename E > | |
| auto | etl::ml::identity_derivative_out ([[maybe_unused]] E &&value) |
| Return the derivative of the identiy function for the given output value. More... | |
| template<etl_expr E> | |
| auto | etl::ml::sigmoid_derivative_out (E &&value) -> decltype(value >>(1.0 - value)) |
| Return the derivative of the logistic sigmoid of the given ETL expression, with respect to the output value. More... | |
| template<typename E > | |
| auto | etl::ml::softmax_derivative_out ([[maybe_unused]] E &&e) |
| Return the derivative of the softmax function of the given ETL expression, with respect to output values. More... | |
| template<etl_expr E> | |
| auto | etl::ml::tanh_derivative_out (E &&value) -> decltype(1.0 -(value >> value)) |
| Return the derivative of the tanh function of the given ETL expression, with respect to the output values. More... | |
| template<etl_expr E> | |
| auto | etl::ml::relu_derivative_out (const E &value) -> detail::unary_helper< E, relu_derivative_op > |
| Return the derivative of the relu function of the given ETL expression, with respect for the output values. More... | |
| template<typename O , typename E > | |
| decltype(auto) | etl::ml::identity_backward ([[maybe_unused]] O &&output, E &&errors) |
| Return the backward activation of the identity function. More... | |
| template<typename O , typename E > | |
| auto | etl::ml::sigmoid_backward (O &&output, E &&errors) -> detail::left_binary_helper< O, E, sigmoid_derivative_binary_op > |
| Return the backward activation of the sigmoid function. More... | |
| template<typename O , typename E > | |
| auto | etl::ml::relu_backward (O &&output, E &&errors) -> detail::left_binary_helper< O, E, relu_derivative_binary_op > |
| Return the backward activation of the RELU function. More... | |
| template<typename O , typename E > | |
| decltype(auto) | etl::ml::softmax_backward ([[maybe_unused]] O &&output, E &&errors) |
| Return the backward activation of the softmax function. More... | |
| template<typename O , etl_expr E> | |
| auto | etl::ml::tanh_backward (O &&output, E &&errors) |
| Return the backward activation of the tanh function. More... | |
| template<etl_expr O, etl_expr L> | |
| value_t< O > | etl::ml::cce_loss (O &&output, L &&labels, value_t< O > scale) |
| Returns the Categorical Cross Entropy Loss. More... | |
| template<etl_expr O, etl_expr L> | |
| value_t< O > | etl::ml::cce_error (O &&output, L &&labels, value_t< O > scale) |
| Returns the Categorical Cross Entropy Error. More... | |
| template<etl_expr O, etl_expr L> | |
| value_t< O > | etl::ml::bce_loss (O &&output, L &&labels, value_t< O > scale) |
| Returns the Binary Cross Entropy Loss. More... | |
| template<etl_expr O, etl_expr L> | |
| value_t< O > | etl::ml::bce_error (O &&output, L &&labels, value_t< O > scale) |
| Returns the Binary Cross Entropy Error. More... | |
| template<etl_expr O, etl_expr L> | |
| std::pair< value_t< O >, value_t< O > > | etl::ml::bce (O &&output, L &&labels, value_t< O > alpha, value_t< O > beta) |
| Returns the Binary Cross Entropy Loss and Error. More... | |
| template<etl_expr O, etl_expr L> | |
| std::pair< value_t< O >, value_t< O > > | etl::ml::cce (O &&output, L &&labels, value_t< O > alpha, value_t< O > beta) |
| Returns the Categorical Cross Entropy Loss and Error. More... | |
| template<etl_expr O, etl_expr L> | |
| value_t< O > | etl::ml::mse_loss (O &&output, L &&labels, value_t< O > scale) |
| Returns the Binary Cross Entropy Loss. More... | |
| template<etl_expr O, etl_expr L> | |
| value_t< O > | etl::ml::mse_error (O &&output, L &&labels, value_t< O > scale) |
| Returns the Binary Cross Entropy Error. More... | |
| template<etl_expr O, etl_expr L> | |
| std::pair< value_t< O >, value_t< O > > | etl::ml::mse (O &&output, L &&labels, value_t< O > alpha, value_t< O > beta) |
| Returns the Binary Cross Entropy Loss and Error. More... | |
Contains some special helpers for machine learning.
This is mostly a simpler set of names and functions to achieve machine learning features.
| pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, C3, false> etl::ml::avg_pool_3d_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors | ||
| ) |
Derivative of the 2D Avg Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| dyn_pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, false> etl::ml::avg_pool_3d_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors, | ||
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | c3 | ||
| ) |
Derivative of the 2D Average Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| auto etl::ml::avg_pool_3d_forward | ( | E && | value | ) |
Forward 3D Average Pooling of the given matrix expression.
| value | The matrix expression |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| C3 | The third pooling ratio |
| auto etl::ml::avg_pool_3d_forward | ( | E && | value, |
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | c3 | ||
| ) |
Forward 3D Average Pooling of the given matrix expression.
| value | The matrix expression |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| c3 | The third pooling ratio |
| pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, S1, S2, P1, P2, false> etl::ml::avg_pool_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors | ||
| ) |
Derivative of the 2D Avg Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, false> etl::ml::avg_pool_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors, | ||
| size_t | c1, | ||
| size_t | c2 | ||
| ) |
Derivative of the 2D Average Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, false> etl::ml::avg_pool_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors, | ||
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | s1, | ||
| size_t | s2, | ||
| size_t | p1 = 0, |
||
| size_t | p2 = 0 |
||
| ) |
Derivative of the 2D Average Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| auto etl::ml::avg_pool_forward | ( | E && | value | ) |
Forward Average Pooling of the given matrix expression.
| value | The matrix expression |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| auto etl::ml::avg_pool_forward | ( | E && | value, |
| size_t | c1, | ||
| size_t | c2 | ||
| ) |
2D Average Pooling of the given matrix expression
| value | The matrix expression |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| auto etl::ml::avg_pool_forward | ( | E && | value, |
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | s1, | ||
| size_t | s2, | ||
| size_t | p1 = 0, |
||
| size_t | p2 = 0 |
||
| ) |
2D Average Pooling of the given matrix expression
| value | The matrix expression |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| std::pair<value_t<O>, value_t<O> > etl::ml::bce | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | alpha, | ||
| value_t< O > | beta | ||
| ) |
Returns the Binary Cross Entropy Loss and Error.
| output | The outputs |
| labels | The labels |
| value_t<O> etl::ml::bce_error | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | scale | ||
| ) |
Returns the Binary Cross Entropy Error.
| output | The outputs |
| labels | The labels |
| value_t<O> etl::ml::bce_loss | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | scale | ||
| ) |
Returns the Binary Cross Entropy Loss.
| output | The outputs |
| labels | The labels |
| std::pair<value_t<O>, value_t<O> > etl::ml::cce | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | alpha, | ||
| value_t< O > | beta | ||
| ) |
Returns the Categorical Cross Entropy Loss and Error.
| output | The outputs |
| labels | The labels |
| value_t<O> etl::ml::cce_error | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | scale | ||
| ) |
Returns the Categorical Cross Entropy Error.
| output | The outputs |
| labels | The labels |
| value_t<O> etl::ml::cce_loss | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | scale | ||
| ) |
Returns the Categorical Cross Entropy Loss.
| output | The outputs |
| labels | The labels |
| conv_4d_backward_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::ml::convolution_backward | ( | A && | a, |
| B && | b | ||
| ) |
Backward convolution for a batch of images with a set of kernels.
This will compute the 2D backward convolutions of each image with each given kernels. The results accross channels will be accumulated together.
The 4D matrix a is assumed to be of [N, K, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hj, Wj] dimensions. The 4D matrix c is assumed to be of [N, C, (Hi - Hj + 2 * P1) / S1 + 1, (Wi - Hj + 2 * P2) / S2 + 1] dimensions.
| a | An expression containing the batch of images |
| b | An expression containing the set of kernels |
| S1 | The stride in the first dimension |
| S2 | The stride in the second dimension |
| P1 | The padding of the first dimension |
| P2 | The padding of the second dimension |
| dyn_conv_4d_backward_expr<detail::build_type<A>, detail::build_type<B>, true> etl::ml::convolution_backward | ( | A && | a, |
| B && | b, | ||
| size_t | s1, | ||
| size_t | s2, | ||
| size_t | p1 = 0, |
||
| size_t | p2 = 0 |
||
| ) |
Backward convolution for a batch of images with a set of kernels.
This will compute the 2D convolutions of each image with each given kernels. The results accross channels will be accumulated together.
The 4D matrix a is assumed to be of [N, K, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hj, Wj] dimensions. The 4D matrix c is assumed to be of [N, C, (Hi - Hj + 2 * P1) / S1 + 1, (Wi - Hj + 2 * P2) / S2 + 1] dimensions.
| a | An expression containing the batch of images |
| b | An expression containing the set of kernels |
| s1 | The stride in the first dimension |
| s2 | The stride in the second dimension |
| p1 | The padding of the first dimension |
| p2 | The padding of the second dimension |
| conv_4d_backward_filter_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::ml::convolution_backward_filter | ( | A && | a, |
| B && | b | ||
| ) |
Backward convolution for a batch of images with a set of kernels.
This will compute the 2D backward convolutions of each image with each given kernels. The results accross channels will be accumulated together.
The 4D matrix a is assumed to be of [N, K, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hj, Wj] dimensions. The 4D matrix c is assumed to be of [N, C, (Hi - Hj + 2 * P1) / S1 + 1, (Wi - Hj + 2 * P2) / S2 + 1] dimensions.
| a | An expression containing the batch of images |
| b | An expression containing the set of kernels |
| S1 | The stride in the first dimension |
| S2 | The stride in the second dimension |
| P1 | The padding of the first dimension |
| P2 | The padding of the second dimension |
| dyn_conv_4d_backward_filter_expr<detail::build_type<A>, detail::build_type<B>, true> etl::ml::convolution_backward_filter | ( | A && | a, |
| B && | b, | ||
| size_t | s1, | ||
| size_t | s2, | ||
| size_t | p1 = 0, |
||
| size_t | p2 = 0 |
||
| ) |
Backward convolution for a batch of images with a set of kernels.
This will compute the 2D convolutions of each image with each given kernels. The results accross channels will be accumulated together.
The 4D matrix a is assumed to be of [N, K, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hj, Wj] dimensions. The 4D matrix c is assumed to be of [N, C, (Hi - Hj + 2 * P1) / S1 + 1, (Wi - Hj + 2 * P2) / S2 + 1] dimensions.
| a | An expression containing the batch of images |
| b | An expression containing the set of kernels |
| s1 | The stride in the first dimension |
| s2 | The stride in the second dimension |
| p1 | The padding of the first dimension |
| p2 | The padding of the second dimension |
| conv_4d_valid_expr<detail::build_type<A>, detail::build_type<B>, S1, S2, P1, P2, true> etl::ml::convolution_forward | ( | A && | a, |
| B && | b | ||
| ) |
Forward convolution for a batch of images with a set of kernels.
This will compute the 2D convolutions of each image with each given kernels. The results accross channels will be accumulated together.
The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hj, Wj] dimensions. The 4D matrix c is assumed to be of [N, K, (Hi - Hj + 2 * P1) / S1 + 1, (Wi - Hj + 2 * P2) / S2 + 1] dimensions.
| a | An expression containing the batch of images |
| b | An expression containing the set of kernels |
| S1 | The stride in the first dimension |
| S2 | The stride in the second dimension |
| P1 | The padding of the first dimension |
| P2 | The padding of the second dimension |
| dyn_conv_4d_valid_expr<detail::build_type<A>, detail::build_type<B>, true> etl::ml::convolution_forward | ( | A && | a, |
| B && | b, | ||
| size_t | s1, | ||
| size_t | s2, | ||
| size_t | p1 = 0, |
||
| size_t | p2 = 0 |
||
| ) |
Forward convolution for a batch of images with a set of kernels.
This will compute the 2D convolutions of each image with each given kernels. The results accross channels will be accumulated together.
The 4D matrix a is assumed to be of [N, C, Hi, Wi] dimensions. The 4D matrix b is assumed to be of [K, C, Hj, Wj] dimensions. The 4D matrix c is assumed to be of [N, K, (Hi - Hj + 2 * P1) / S1 + 1, (Wi - Hj + 2 * P2) / S2 + 1] dimensions.
| a | An expression containing the batch of images |
| b | An expression containing the set of kernels |
| s1 | The stride in the first dimension |
| s2 | The stride in the second dimension |
| p1 | The padding of the first dimension |
| p2 | The padding of the second dimension |
| decltype(auto) etl::ml::identity_backward | ( | [[maybe_unused] ] O && | output, |
| E && | errors | ||
| ) |
Return the backward activation of the identity function.
| output | The output of the forward activation function |
| errors | The errors at output of this activation function |
| auto etl::ml::identity_derivative_out | ( | [[maybe_unused] ] E && | value | ) |
Return the derivative of the identiy function for the given output value.
| value | The ETL expression |
| pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, C3, true> etl::ml::max_pool_3d_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors | ||
| ) |
Derivative of the 3D Max Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| dyn_pool_upsample_3d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, true> etl::ml::max_pool_3d_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors, | ||
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | c3 | ||
| ) |
Derivative of the 3D Max Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| auto etl::ml::max_pool_3d_forward | ( | E && | value | ) |
Forward 3D Max Pooling of the given matrix expression.
| value | The matrix expression |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| C3 | The third pooling ratio |
| auto etl::ml::max_pool_3d_forward | ( | E && | value, |
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | c3 | ||
| ) |
Forward 3D Max Pooling of the given matrix expression.
| value | The matrix expression |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| c3 | The second pooling ratio |
| pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, C1, C2, S1, S2, P1, P2, true> etl::ml::max_pool_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors | ||
| ) |
Derivative of the 2D Max Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, true> etl::ml::max_pool_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors, | ||
| size_t | c1, | ||
| size_t | c2 | ||
| ) |
Derivative of the 2D Max Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| dyn_pool_upsample_2d_expr<detail::build_type<A>, detail::build_type<B>, detail::build_type<C>, true> etl::ml::max_pool_backward | ( | A && | input, |
| B && | output, | ||
| C && | errors, | ||
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | s1, | ||
| size_t | s2, | ||
| size_t | p1 = 0, |
||
| size_t | p2 = 0 |
||
| ) |
Derivative of the 2D Max Pooling of the given matrix expression and upsampling.
| input | The input |
| output | The output |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| auto etl::ml::max_pool_forward | ( | E && | value | ) |
Forward 2D Max Pooling of the given matrix expression.
| value | The matrix expression |
| C1 | The first pooling ratio |
| C2 | The second pooling ratio |
| auto etl::ml::max_pool_forward | ( | E && | value, |
| size_t | c1, | ||
| size_t | c2 | ||
| ) |
Forward 2D Max Pooling of the given matrix expression.
| value | The matrix expression |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| auto etl::ml::max_pool_forward | ( | E && | value, |
| size_t | c1, | ||
| size_t | c2, | ||
| size_t | s1, | ||
| size_t | s2, | ||
| size_t | p1 = 0, |
||
| size_t | p2 = 0 |
||
| ) |
Forward 2D Max Pooling of the given matrix expression.
| value | The matrix expression |
| c1 | The first pooling ratio |
| c2 | The second pooling ratio |
| std::pair<value_t<O>, value_t<O> > etl::ml::mse | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | alpha, | ||
| value_t< O > | beta | ||
| ) |
Returns the Binary Cross Entropy Loss and Error.
| output | The outputs |
| labels | The labels |
| value_t<O> etl::ml::mse_error | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | scale | ||
| ) |
Returns the Binary Cross Entropy Error.
| output | The outputs |
| labels | The labels |
| value_t<O> etl::ml::mse_loss | ( | O && | output, |
| L && | labels, | ||
| value_t< O > | scale | ||
| ) |
Returns the Binary Cross Entropy Loss.
| output | The outputs |
| labels | The labels |
| auto etl::ml::relu_backward | ( | O && | output, |
| E && | errors | ||
| ) | -> detail::left_binary_helper<O, E, relu_derivative_binary_op> |
Return the backward activation of the RELU function.
| output | The output of the forward activation function |
| errors | The errors at output of this activation function |
| auto etl::ml::relu_derivative_out | ( | const E & | value | ) | -> detail::unary_helper<E, relu_derivative_op> |
Return the derivative of the relu function of the given ETL expression, with respect for the output values.
| value | The ETL expression |
| auto etl::ml::sigmoid_backward | ( | O && | output, |
| E && | errors | ||
| ) | -> detail::left_binary_helper<O, E, sigmoid_derivative_binary_op> |
Return the backward activation of the sigmoid function.
| output | The output of the forward activation function |
| errors | The errors at output of this activation function |
| auto etl::ml::sigmoid_derivative_out | ( | E && | value | ) | -> decltype(value >> (1.0 - value)) |
Return the derivative of the logistic sigmoid of the given ETL expression, with respect to the output value.
| value | The ETL expression |
| decltype(auto) etl::ml::softmax_backward | ( | [[maybe_unused] ] O && | output, |
| E && | errors | ||
| ) |
Return the backward activation of the softmax function.
| output | The output of the forward activation function |
| errors | The errors at output of this activation function |
| auto etl::ml::softmax_derivative_out | ( | [[maybe_unused] ] E && | e | ) |
Return the derivative of the softmax function of the given ETL expression, with respect to output values.
| e | The ETL expression |
| auto etl::ml::tanh_backward | ( | O && | output, |
| E && | errors | ||
| ) |
Return the backward activation of the tanh function.
| output | The output of the forward activation function |
| errors | The errors at output of this activation function |
| auto etl::ml::tanh_derivative_out | ( | E && | value | ) | -> decltype(1.0 - (value >> value)) |
Return the derivative of the tanh function of the given ETL expression, with respect to the output values.
| value | The ETL expression |
1.8.13