Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit b22c65f

Browse files
committed
rev 10
1 parent f61f7ad commit b22c65f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

course_UvA-DL/10-autoregressive-image-modeling/.meta.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: "Tutorial 10: Autoregressive Image Modeling"
22
author: Phillip Lippe
33
created: 2021-07-12
4-
updated: 2023-01-04
4+
updated: 2021-07-12
55
license: CC BY-SA
66
build: 0
77
tags:
@@ -18,6 +18,5 @@ requirements:
1818
- torchvision
1919
- matplotlib
2020
- seaborn
21-
- pytorch-lightning>=1.8
2221
accelerator:
2322
- GPU

course_UvA-DL/10-autoregressive-image-modeling/Autoregressive_Image_Modeling.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
pl.seed_everything(42)
6969

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

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

0 commit comments

Comments
 (0)