Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
rev 10
  • Loading branch information
Borda committed Mar 14, 2023
commit b22c65f55f97a82c552dcec620612a6557389b2c
3 changes: 1 addition & 2 deletions course_UvA-DL/10-autoregressive-image-modeling/.meta.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: "Tutorial 10: Autoregressive Image Modeling"
author: Phillip Lippe
created: 2021-07-12
updated: 2023-01-04
updated: 2021-07-12
license: CC BY-SA
build: 0
tags:
Expand All @@ -18,6 +18,5 @@ requirements:
- torchvision
- matplotlib
- seaborn
- pytorch-lightning>=1.8
accelerator:
- GPU
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
pl.seed_everything(42)

# Ensure that all operations are deterministic on GPU (if used) for reproducibility
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.determinstic = True
torch.backends.cudnn.benchmark = False

# Fetching the device that will be used throughout this notebook
Expand Down Expand Up @@ -677,8 +677,7 @@ def train_model(**kwargs):
# Create a PyTorch Lightning trainer with the generation callback
trainer = pl.Trainer(
default_root_dir=os.path.join(CHECKPOINT_PATH, "PixelCNN"),
accelerator="gpu" if str(device).startswith("cuda") else "cpu",
devices=1,
gpus=1 if str(device).startswith("cuda") else 0,
max_epochs=150,
callbacks=[
ModelCheckpoint(save_weights_only=True, mode="min", monitor="val_bpd"),
Expand Down