yes of course , the full training code is:
def update(data, target, model, optimizer):
    model[0].send(data.location)
    model[1].send(data.location)
    
    model[1].zero_grad()
    
    real_cpu = data.float()
    b_size = real_cpu.size(0)

    label = torch.full((b_size,), 1)
    # Forward pass real batch through D
    print(model[0])
    output = model[1](data.float()).view(-1).float()
    # Calculate loss on all-real batch
    errD_real = F.mse_loss(output, target.float())
    # Calculate gradients for D in backward pass
    errD_real.backward()
    
    ## Train with all-fake batch
    # Generate batch of latent vectors
    noise = torch.randn(128,10)
    noise.send(data.location)
#     print(noise)
    # Generate fake image batch with G
    fake = model[0](noise)
    label = torch.zeros(len(noise))
    # Classify all fake batch with D
    output = model[1](fake.detach()).view(-1)
    # Calculate D's loss on the all-fake batch

    errD_fake = F.mse_loss(output, label)
    # Calculate the gradients for this batch
    errD_fake.backward()
    # Add the gradients from the all-real and all-fake batches
    errD = errD_real + errD_fake
    # Update D
    optimizer[1].step()
    
    return model