Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beginner_source/data_loading_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion beginner_source/dcgan_faces_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down