|
LMMC
Lamina Mathematic core
|
三阶张量的逐元素运算、范数与归约。 更多...
#include "internal/tensor3_internal.h"三阶张量的逐元素运算、范数与归约。
在文件 tensor3_ops.c 中定义.
| lmmc_status_t lmmc_tensor3_fill | ( | lmmc_tensor3_t * | tensor, |
| lmmc_real_t | value ) |
用 value 填充张量所有元素。
在文件 tensor3_ops.c 第 7 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_SET, LMMC_STATUS_INVALID_ARGUMENT, LMMC_STATUS_OK, lmmc_tensor3_fill(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_fill().
| lmmc_status_t lmmc_tensor3_norm_fro | ( | const lmmc_tensor3_t * | tensor, |
| lmmc_real_t * | out_norm ) |
用缩放平方和计算张量 Frobenius 范数。
在文件 tensor3_ops.c 第 24 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_STATUS_INVALID_ARGUMENT, LMMC_STATUS_OK, lmmc_tensor3_norm_fro(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_norm_fro().
| lmmc_status_t lmmc_tensor3_add | ( | const lmmc_tensor3_t * | a, |
| const lmmc_tensor3_t * | b, | ||
| lmmc_tensor3_t * | out_tensor ) |
同形状张量逐元素加法。
在文件 tensor3_ops.c 第 47 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_ADD, LMMC_REAL_CLEAR, LMMC_REAL_INIT, LMMC_REAL_SET, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_add(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_add().
| lmmc_status_t lmmc_tensor3_sub | ( | const lmmc_tensor3_t * | a, |
| const lmmc_tensor3_t * | b, | ||
| lmmc_tensor3_t * | out_tensor ) |
同形状张量逐元素减法。
在文件 tensor3_ops.c 第 80 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_CLEAR, LMMC_REAL_INIT, LMMC_REAL_SET, LMMC_REAL_SUB, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_sub(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_sub().
| lmmc_status_t lmmc_tensor3_mul | ( | const lmmc_tensor3_t * | a, |
| const lmmc_tensor3_t * | b, | ||
| lmmc_tensor3_t * | out_tensor ) |
同形状张量逐元素乘法(Hadamard)。
在文件 tensor3_ops.c 第 113 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_CLEAR, LMMC_REAL_INIT, LMMC_REAL_MUL, LMMC_REAL_SET, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_mul(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_mul().
| lmmc_status_t lmmc_tensor3_div | ( | const lmmc_tensor3_t * | a, |
| const lmmc_tensor3_t * | b, | ||
| lmmc_tensor3_t * | out_tensor ) |
同形状张量逐元素除法,b 中元素须非零。
在文件 tensor3_ops.c 第 146 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_CLEAR, LMMC_REAL_CMP, LMMC_REAL_DIV, LMMC_REAL_INIT, LMMC_REAL_SET, LMMC_REAL_SET_D, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_div(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_div().
| lmmc_status_t lmmc_tensor3_scale | ( | const lmmc_tensor3_t * | tensor, |
| lmmc_real_t | alpha, | ||
| lmmc_tensor3_t * | out_tensor ) |
标量乘:out = alpha * tensor。
在文件 tensor3_ops.c 第 185 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_CLEAR, LMMC_REAL_INIT, LMMC_REAL_MUL, LMMC_REAL_SET, LMMC_STATUS_DIMENSION_MISMATCH, LMMC_STATUS_INVALID_ARGUMENT, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_scale(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_scale().
| lmmc_status_t lmmc_tensor3_sum | ( | const lmmc_tensor3_t * | tensor, |
| lmmc_real_t * | out_sum ) |
累加全部元素。
在文件 tensor3_ops.c 第 223 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_ADD, LMMC_REAL_CLEAR, LMMC_REAL_INIT, LMMC_REAL_SET, LMMC_REAL_SET_D, LMMC_STATUS_INVALID_ARGUMENT, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_sum(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_sum().
| lmmc_status_t lmmc_tensor3_max | ( | const lmmc_tensor3_t * | tensor, |
| lmmc_real_t * | out_max ) |
求最大元素。
在文件 tensor3_ops.c 第 260 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_CLEAR, LMMC_REAL_CMP, LMMC_REAL_INIT, LMMC_REAL_SET, LMMC_STATUS_INVALID_ARGUMENT, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_max(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_max().
| lmmc_status_t lmmc_tensor3_min | ( | const lmmc_tensor3_t * | tensor, |
| lmmc_real_t * | out_min ) |
求最小元素。
在文件 tensor3_ops.c 第 293 行定义.
引用了 lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_CLEAR, LMMC_REAL_CMP, LMMC_REAL_INIT, LMMC_REAL_SET, LMMC_STATUS_INVALID_ARGUMENT, LMMC_STATUS_NUMERICAL_FAILURE, LMMC_STATUS_OK, lmmc_tensor3_min(), lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_min().
| lmmc_status_t lmmc_tensor3_sum_axis | ( | const lmmc_tensor3_t * | tensor, |
| size_t | axis, | ||
| lmmc_mat_t * | out_matrix ) |
沿指定轴求和,结果为二维矩阵。
| [in] | tensor | 输入张量。 |
| [in] | axis | 归约轴,取值 0、1 或 2。 |
| [out] | out_matrix | 输出矩阵,形状由其余两维决定。 |
在文件 tensor3_ops.c 第 361 行定义.
引用了 lmmc_mat_t::cols, lmmc_mat_t::data, lmmc_tensor3_t::data, lmmc_tensor3_t::dim0, lmmc_tensor3_t::dim1, lmmc_tensor3_t::dim2, LMMC_REAL_CLEAR, LMMC_REAL_INIT, LMMC_REAL_SET, LMMC_STATUS_OK, lmmc_tensor3_sum_axis(), lmmc_mat_t::rows, lmmc_mat_t::stride, lmmc_tensor3_t::stride0, lmmc_tensor3_t::stride1 , 以及 lmmc_tensor3_t::stride2.
被这些函数引用 lmmc_tensor3_sum_axis().