Copy data from other Tensor instance. Args: t (Tensor): source Tensor.
(self, t)
| 347 | print('Not implemented yet for ', dt) |
| 348 | |
| 349 | def copy_data(self, t): |
| 350 | '''Copy data from other Tensor instance. |
| 351 | |
| 352 | Args: |
| 353 | t (Tensor): source Tensor. |
| 354 | ''' |
| 355 | assert (t.size() == self.size()), "tensor shape should be the same" |
| 356 | assert isinstance(t, Tensor), 't must be a singa Tensor instance' |
| 357 | self.data.CopyData(t.data) |
| 358 | |
| 359 | def copy_from(self, t, offset=0): |
| 360 | ''' Copy the data from the numpy array or other Tensor instance |