Describe the bug
Not sure if this was reported before. Couldn't find any issue about it. It seems like .size() method is not implemented for PointerTensors, making the Wrapper return torch.Size([0])
To Reproduce
Here's a script demonstrating the issue
import torch
import syft
hook = syft.TorchHook(torch)
alice = syft.VirtualWorker(id="alice", hook=hook)
x = torch.Tensor([[1,2,3]])
print(x.size()) #=> torch.Size([1, 3])
# send x to alice and call size
x = x.send(alice)
print(x.size()) #=> torch.Size([0])
Expected behavior
.size() should return the size of the tensor being pointed at.
Desktop (please complete the following information):
Hey,
I would recommend using .shape instead of .size()
We have trouble with .size(), as explained here: https://github.com/OpenMined/PySyft/issues/2201
@LaRiffle not sure why I couldn't find that issue at the time of posting this. Since this is a duplicate, I'll close this issue.
Most helpful comment
Hey,
I would recommend using .shape instead of .size()
We have trouble with .size(), as explained here: https://github.com/OpenMined/PySyft/issues/2201