| 517 | |
| 518 | template <typename T> |
| 519 | TensorProto CreateAsProtoField(int size, int tail_length) { |
| 520 | auto values = VectorWithConstantTail<T>(size, tail_length); |
| 521 | Tensor tensor(DataTypeToEnum<T>::value, TensorShape({size})); |
| 522 | std::copy(values.begin(), values.end(), tensor.flat<T>().data()); |
| 523 | TensorProto tensor_proto; |
| 524 | tensor.AsProtoField(&tensor_proto); |
| 525 | return tensor_proto; |
| 526 | } |
| 527 | |
| 528 | template <typename T> |
| 529 | void CompareTensorValues(const TensorProto& x, const TensorProto& y) { |
nothing calls this directly
no test coverage detected