Home
last modified time | relevance | path

Searched refs:tensor2 (Results 1 – 5 of 5) sorted by relevance

/external/eigen/unsupported/test/
Dcxx11_tensor_layout_swap.cpp21 Tensor<float, 3, RowMajor> tensor2 = tensor.swap_layout(); in test_simple_swap() local
22 VERIFY_IS_EQUAL(tensor.dimension(0), tensor2.dimension(2)); in test_simple_swap()
23 VERIFY_IS_EQUAL(tensor.dimension(1), tensor2.dimension(1)); in test_simple_swap()
24 VERIFY_IS_EQUAL(tensor.dimension(2), tensor2.dimension(0)); in test_simple_swap()
29 VERIFY_IS_EQUAL(tensor(i,j,k), tensor2(k,j,i)); in test_simple_swap()
41 Tensor<float, 3, RowMajor> tensor2(7,3,2); in test_swap_as_lvalue() local
42 tensor2.swap_layout() = tensor; in test_swap_as_lvalue()
43 VERIFY_IS_EQUAL(tensor.dimension(0), tensor2.dimension(2)); in test_swap_as_lvalue()
44 VERIFY_IS_EQUAL(tensor.dimension(1), tensor2.dimension(1)); in test_swap_as_lvalue()
45 VERIFY_IS_EQUAL(tensor.dimension(2), tensor2.dimension(0)); in test_swap_as_lvalue()
[all …]
Dcxx11_tensor_morphing.cpp22 Tensor<float, 3> tensor2(2,3,7); in test_simple_reshape() local
27 tensor2 = tensor1.reshape(dim1); in test_simple_reshape()
36 VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor2(i,j,k)); in test_simple_reshape()
53 TensorMap<Tensor<float, 5>> tensor2(m2.data(), 3,5,7,11,13); in test_reshape_in_expr() local
59 tensor3 = tensor1.reshape(newDims1).contract(tensor2.reshape(newDims2), contract_along); in test_reshape_in_expr()
140 TensorMap<Tensor<float, 2, DataLayout>> tensor2(m2.data(), 3, 3); in test_slice_in_expr() local
149 …tensor3 = tensor1.slice(indices1, sizes1).contract(tensor2.slice(indices2, sizes2), contract_along… in test_slice_in_expr()
171 Tensor<float, 3, DataLayout> tensor2(2,2,7); in test_slice_as_lvalue() local
172 tensor2.setRandom(); in test_slice_as_lvalue()
185 result.slice(second_slice, sizes12).device(Eigen::DefaultDevice()) = tensor2; in test_slice_as_lvalue()
[all …]
Dcxx11_tensor_custom_op.cpp88 Tensor<float, 3> tensor2(3,7,5); in test_custom_binary_op() local
89 tensor2.setRandom(); in test_custom_binary_op()
91 Tensor<float, 3> result = tensor1.customOp(tensor2, BatchMatMul()); in test_custom_binary_op()
96 Tensor<float, 2> reference = tensor1.chip<2>(i).contract(tensor2.chip<2>(i), dims); in test_custom_binary_op()
Dcxx11_tensor_io.cpp74 Tensor<int, 1, DataLayout> tensor2(5); in test_output_expr() local
77 tensor2(i) = 7; in test_output_expr()
81 os << tensor1 + tensor2; in test_output_expr()
Dcxx11_tensor_assign.cpp234 Tensor<int, 1> tensor2(3); in test_auto_resize() local
241 tensor1 = tensor2 = tensor3 = tensor4 = new_tensor; in test_auto_resize()
244 VERIFY_IS_EQUAL(tensor2.dimension(0), new_tensor.dimension(0)); in test_auto_resize()
249 VERIFY_IS_EQUAL(tensor2(i), new_tensor(i)); in test_auto_resize()