153 std::vector<int> dims{2, 3, 5, 7};
155 for (
int dim = 0; dim < 4; ++dim) {
157 tensor = (tensor + tensor.constant(0.5)).
log();
161 for (
int i = 0;
i < 2; ++
i) {
162 for (
int j = 0;
j < 3; ++
j) {
163 for (
int k = 0;
k < 5; ++
k) {
164 for (
int l = 0; l < 7; ++l) {
169 if (ix[dim] != 0)
continue;
177 tensor_argmax = tensor.argmax(dim);
180 for (ptrdiff_t
n = 0;
n < tensor_argmax.
size(); ++
n) {
185 for (
int i = 0;
i < 2; ++
i) {
186 for (
int j = 0;
j < 3; ++
j) {
187 for (
int k = 0;
k < 5; ++
k) {
188 for (
int l = 0; l < 7; ++l) {
193 if (ix[dim] != tensor.dimension(dim) - 1)
continue;
201 tensor_argmax = tensor.argmax(dim);
204 for (ptrdiff_t
n = 0;
n < tensor_argmax.
size(); ++
n) {
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
The tensor class.
Definition: Tensor.h:68
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const
Definition: Tensor.h:101
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
Definition: Tensor.h:102
char char char int int * k
Definition: level2_impl.h:374
#define VERIFY_IS_EQUAL(a, b)
Definition: main.h:367
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
std::array< T, N > array
Definition: EmulateArray.h:231
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2