Txeo v0.1
A Developer-Friendly TensorFlow C++ Wrapper
|
A utility class for aggregation functions on tensors. More...
#include <TensorAgg.h>
Public Member Functions | |
TensorAgg (const TensorAgg &)=delete | |
TensorAgg (TensorAgg &&)=delete | |
TensorAgg & | operator= (const TensorAgg &)=delete |
TensorAgg & | operator= (TensorAgg &&)=delete |
~TensorAgg ()=default | |
Static Public Member Functions | |
static txeo::Tensor< T > | reduce_sum (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the sum of tensor elements along the specified axes. | |
static txeo::Tensor< T > | reduce_prod (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the product of tensor elements along the specified axes. | |
static txeo::Tensor< T > | reduce_mean (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the mean of tensor elements along the specified axes. | |
static txeo::Tensor< T > | reduce_max (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the maximum of tensor elements along the specified axes. | |
static txeo::Tensor< T > | reduce_min (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the minimum of tensor elements along the specified axes. | |
static txeo::Tensor< T > | reduce_euclidean_norm (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the Euclidean norm of tensor elements along the specified axes. | |
static txeo::Tensor< T > | reduce_maximum_norm (const txeo::Tensor< T > &tensor, size_t axis) |
Computes the maximum norm of tensor elements along the specified axis. | |
static txeo::Tensor< T > | reduce_variance (const txeo::Tensor< T > &tensor, size_t axis) |
Computes the variance of tensor elements along the specified axis. | |
static txeo::Tensor< T > | reduce_standard_deviation (const txeo::Tensor< T > &tensor, size_t axis) |
Computes the standard deviation of tensor elements along the specified axis. | |
static txeo::Tensor< T > | reduce_median (const txeo::Tensor< T > &tensor, size_t axis) |
Computes the median of tensor elements along the specified axis. | |
static txeo::Tensor< T > | reduce_geometric_mean (const txeo::Tensor< T > &tensor, size_t axis) |
Computes the geometric mean of tensor elements along the specified axis. | |
static txeo::Tensor< T > | reduce_all (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the logical AND (all ) of tensor elements along the specified axes. | |
static txeo::Tensor< T > | reduce_any (const txeo::Tensor< T > &tensor, const std::vector< size_t > &axes) |
Computes the logical OR (any ) of tensor elements along the specified axes. | |
static txeo::Tensor< T > | cumulative_sum (const txeo::Tensor< T > &tensor, size_t axis) |
Computes the cumulative sum of tensor elements along the specified axis. | |
static txeo::Tensor< T > | cumulative_prod (const txeo::Tensor< T > &tensor, size_t axis) |
Computes the cumulative product of tensor elements along the specified axis. | |
static txeo::Tensor< size_t > | arg_max (const txeo::Tensor< T > &tensor, size_t axis) |
Finds the indices of the maximum values along the specified axis. | |
static txeo::Tensor< size_t > | arg_min (const txeo::Tensor< T > &tensor, size_t axis) |
Finds the indices of the minimum values along the specified axis. | |
static txeo::Tensor< size_t > | count_non_zero (const txeo::Tensor< T > &tensor, size_t axis) |
Counts the number of non-zero elements along the specified axis. | |
static T | sum_all (const txeo::Tensor< T > &tensor) |
Computes the sum of all elements in the tensor. | |
A utility class for aggregation functions on tensors.
This class provides static methods for aggregation functions on tensors, such reduce_mean.
T | The data type of the tensor/vector elements (e.g., int, double). |
Definition at line 22 of file TensorAgg.h.
|
delete |
|
delete |
|
default |
|
static |
Finds the indices of the maximum values along the specified axis.
tensor | The input tensor. |
axis | The axis along which to find the maximum indices. |
Example Usage:
|
static |
Finds the indices of the minimum values along the specified axis.
tensor | The input tensor. |
axis | The axis along which to find the minimum indices. |
Example Usage:
|
static |
Counts the number of non-zero elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to count non-zero elements. |
Example Usage:
|
static |
Computes the cumulative product of tensor elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to compute the cumulative product. |
Example Usage:
|
static |
Computes the cumulative sum of tensor elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to compute the cumulative sum. |
Example Usage:
|
delete |
|
delete |
|
static |
Computes the logical AND (all
) of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the logical AND. |
Example Usage:
|
static |
Computes the logical OR (any
) of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the logical OR. |
Example Usage:
|
static |
Computes the Euclidean norm of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the Euclidean norm. |
Example Usage:
|
static |
Computes the geometric mean of tensor elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to compute the geometric mean. |
Example Usage:
|
static |
Computes the maximum of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the maximum. |
Example Usage:
|
static |
Computes the maximum norm of tensor elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to compute the maximum norm. |
Example Usage:
|
static |
Computes the mean of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the mean. |
Example Usage:
|
static |
Computes the median of tensor elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to compute the median. |
Example Usage:
|
static |
Computes the minimum of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the minimum. |
Example Usage:
|
static |
Computes the product of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the product. |
Example Usage:
|
static |
Computes the standard deviation of tensor elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to compute the standard deviation. |
Example Usage:
|
static |
Computes the sum of tensor elements along the specified axes.
tensor | The input tensor. |
axes | The axes along which to compute the sum. |
Example Usage:
|
static |
Computes the variance of tensor elements along the specified axis.
tensor | The input tensor. |
axis | The axis along which to compute the variance. |
Example Usage:
|
static |
Computes the sum of all elements in the tensor.
tensor | The input tensor. |
Example Usage: