| 349 | zero_t(DT_FLOAT, TensorShape({3, 0, 2, 0, 5})) {} |
| 350 | |
| 351 | void SetUp() override { |
| 352 | EXPECT_TRUE(t.shape().IsSameSize(TensorShape({2, 3, 4, 5}))); |
| 353 | EXPECT_TRUE(zero_t.shape().IsSameSize(TensorShape({3, 0, 2, 0, 5}))); |
| 354 | |
| 355 | auto tensor = t.tensor<float, 4>(); |
| 356 | EXPECT_EQ(2, tensor.dimension(0)); |
| 357 | EXPECT_EQ(3, tensor.dimension(1)); |
| 358 | EXPECT_EQ(4, tensor.dimension(2)); |
| 359 | EXPECT_EQ(5, tensor.dimension(3)); |
| 360 | |
| 361 | // Set first and last elements. |
| 362 | tensor(0, 0, 0, 0) = 0.01f; |
| 363 | tensor(1, 2, 3, 4) = 0.02f; |
| 364 | } |
| 365 | |
| 366 | template <typename T> |
| 367 | using ReshapeFunc = T (Tensor::*)(gtl::ArraySlice<int64>); |
nothing calls this directly
no test coverage detected