PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

TypeError: tuple_one_fold() got an unexpected keyword argument 'response_ids'

Open deepquantum88 opened this issue 3 years ago • 2 comments

Description

A clear and concise description of the bug. print("input", x) #the above statement displays "input (Wrapper)>[PointerTensor | me:39278915926 -> bob:68975166682]" But when I try the below statement... it throws an error. print("list", x.tolist())

class Net(nn.Module): def init(self): super(Net, self).init() self.conv1 = nn.Conv2d(1, 6, kernel_size=5) self.conv2 = nn.Conv2d(6, 16, kernel_size=5) self.dropout = nn.Dropout2d() self.fc1 = nn.Linear(256, 64) self.fc2 = nn.Linear(64, 1)

def forward(self, x):
    x = F.relu(self.conv1(x))
    x = F.max_pool2d(x, 2)
    x = F.relu(self.conv2(x))
    x = F.max_pool2d(x, 2)
    x = self.dropout(x)
    x = x.view(1, -1)
    x = F.relu(self.fc1(x))
    x = self.fc2(x)
    print("input", x)
    print("list", x.tolist())  #here 
    return x

Additional Context

Add any other context about the problem here.

model.train() for epoch in range(epochs): model.train() for batch_idx, (data, target) in enumerate(federated_train_loader):

    model.send(data.location) # <-- NEW: send the model to the right location
    
    #print("location_data", data.location)
    #print("location_data_id", data.id_at_location)
    
    optimizer.zero_grad()

    data = data.cuda()
    target = target.cuda()
    
    # Forward pass
    
    output = model(data).cuda()

deepquantum88 avatar Feb 11 '22 15:02 deepquantum88

Is this issue still available?

Rohan581 avatar Feb 22 '22 18:02 Rohan581

@deepquantum88 are you able to show the error? If you call tolist you would then just get a ListPointer instead of a TensorPointer, is there a reason you need to?

madhavajay avatar Jun 08 '22 06:06 madhavajay

0.5 is no longer supported.

madhavajay avatar Nov 17 '22 07:11 madhavajay