Returns a reshaped input Tensor. The underlying buffer is not copied.
| 300 | |
| 301 | // Returns a reshaped input Tensor. The underlying buffer is not copied. |
| 302 | Status CopyFrom(const Tensor& input, const TensorShape& shape, Tensor* output) { |
| 303 | if (output->CopyFrom(input, shape)) return Status::OK(); |
| 304 | return errors::Internal( |
| 305 | "Encountered error while reshaping a Tensor of shape ", |
| 306 | input.shape().DebugString(), " to shape ", shape.DebugString()); |
| 307 | } |
| 308 | |
| 309 | // Returns whether transposing would be a no-op; whether input has rank < 2 or |
| 310 | // the permutation is the identity permutation. |
no test coverage detected