| 63 | // Constructs a tensor of "shape" with values "vals". |
| 64 | template <typename T> |
| 65 | Tensor AsTensor(gtl::ArraySlice<T> vals, const TensorShape& shape) { |
| 66 | Tensor ret; |
| 67 | CHECK(ret.CopyFrom(AsTensor(vals), shape)); |
| 68 | return ret; |
| 69 | } |
| 70 | |
| 71 | #define S_TENSOR(size, ...) test::AsTensor<int32>({__VA_ARGS__}, {size}) |
| 72 |
no test coverage detected