| 29 | namespace { |
| 30 | |
| 31 | tensorflow::Tensor CreateTensor(const tensorflow::DataType type, |
| 32 | const std::vector<int64_t>& dim) { |
| 33 | tensorflow::TensorShape shape{tensorflow::gtl::ArraySlice<tensorflow::int64>{ |
| 34 | reinterpret_cast<const tensorflow::int64*>(dim.data()), dim.size()}}; |
| 35 | return {type, shape}; |
| 36 | } |
| 37 | |
| 38 | template <typename T> |
| 39 | int FillTensorWithData(tensorflow::Tensor* tensor, |