PySyft
PySyft copied to clipboard
Indexing pointer tensors with a list
When running the following code
hook = sy.TorchHook(torch)
bob = sy.VirtualWorker(hook, id="bob")
a = torch.tensor([10,20,30])
print(a[[0,2]])
b = torch.tensor([10,20,30]).send(bob)
print(b[[0,2]])
the first tensor a get displayed correctly as
tensor([10, 30])
but the second tensor raises the following error:
IndexError: too many indices for tensor of dimension 1
I have Python 3.7.6, PySyft 0.2.4 and PyTorch 1.4.0.
I'm new to PySyft, so maybe it is an expected behavior for some reasons, but I don't really see why (since remote tensors are supposed to have the same functionalities as normal tensors as far as I understand).
I can take a look.