AttributeError: 'Tensor' object has no attribute 'copy'

I want to deep copy like numpy.copy().
But I met such problem, how can I solve it?

Thanks!

you can use tensor.clone().

2 Likes

I am not sure though why doesn’t PyTorch just reuse standard method names which are easier to anticipate and lookup. Anyway, just my 5 cents.