'Conv3d' object has no attribute "'detach"

while end_slice < ct_array.shape[0]:

        ct_tensor = torch.FloatTensor(ct_array[start_slice: end_slice + 1]).cuda()

        ct_tensor = ct_tensor.unsqueeze(dim=0).unsqueeze(dim=0)

        outputs = net(ct_tensor)

        count[start_slice: end_slice + 1] += 1

        #probability_map[start_slice: end_slice + 1] += np.squeeze(outputs.cpu().detach().numpy())

        del outputs

Anyone got a tip for this? This is the code and error it gives:

Based on the error message you are trying to call detach on the module, not the output tensor, so could you check its type before calling this operation?