diff --git a/beginner_source/data_loading_tutorial.py b/beginner_source/data_loading_tutorial.py index f0cc99ce081..bf812b8eb52 100644 --- a/beginner_source/data_loading_tutorial.py +++ b/beginner_source/data_loading_tutorial.py @@ -374,7 +374,7 @@ def __call__(self, sample): # dataloader = DataLoader(transformed_dataset, batch_size=4, - shuffle=True, num_workers=4) + shuffle=True, num_workers=0) # Helper function to show a batch diff --git a/beginner_source/dcgan_faces_tutorial.py b/beginner_source/dcgan_faces_tutorial.py index 1da4614ebb7..509bf545234 100644 --- a/beginner_source/dcgan_faces_tutorial.py +++ b/beginner_source/dcgan_faces_tutorial.py @@ -591,7 +591,7 @@ def forward(self, input): # Format batch real_cpu = data[0].to(device) b_size = real_cpu.size(0) - label = torch.full((b_size,), real_label, device=device) + label = torch.full((b_size,), real_label, dtype=torch.float, device=device) # Forward pass real batch through D output = netD(real_cpu).view(-1) # Calculate loss on all-real batch