Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHelfer committed Aug 7, 2024
1 parent 92d76aa commit d9dc245
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SuperResolution/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,12 @@ def check_performance(
# Disable gradient computation for evaluation
with torch.no_grad():
# Iterate over batches in the data loader
for (X_val_batch,) in tqdm(data_loader):
for (y_val_batch,) in tqdm(data_loader):
# Move the batch to the specified device
X_val_batch = X_val_batch.to(device)
y_val_batch = y_val_batch.to(device)
X_val_batch = y_val_batch[
:, :, ::downsample, ::downsample, ::downsample
].clone()

# Forward pass: get predictions from the network
y_val_pred, y_val_interp = net(X_val_batch)
Expand Down

0 comments on commit d9dc245

Please sign in to comment.