| 30 | namespace tensor { |
| 31 | |
| 32 | Tensor DeepCopy(const Tensor& other) { |
| 33 | Tensor tmp = Tensor(other.dtype(), other.shape()); |
| 34 | DeepCopy(other, &tmp); |
| 35 | return tmp; |
| 36 | } |
| 37 | |
| 38 | void DeepCopy(const Tensor& input, Tensor* output) { |
| 39 | if (DataTypeCanUseMemcpy(input.dtype())) { |