'Tensor' object has no attribute 'send'

111 views Asked by At

I am using the pysyft library 0.8.2 to implement Federated Learning experiment. At one part of the code I am supposed to send the tensor information over clients established using pysyft commands. But the attributes send() and get() are no longer supported by Pytorch 2.1.0.

import torch import pysyft as sy

bob = sy.Worker(name='bob') print(bob) print(bob.client_cache) x = torch.tensor([1,2,3]) print(x) x.send(bob) # error message: 'Tensor' objects has no attributes 'send' print(x)

How to overcome this dilemma and send tensors over the clients?

I do not know whether I have to download an older version of pytorch to get send() and get() attributes or there will be another way to send the tensor over pysyft client.

0

There are 0 answers