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
Next Next commit
Merge branch 'main' into pyproject
  • Loading branch information
Borda committed Mar 24, 2023
commit c44b87abde3f0d57d803f0c3d07cf3f205532df1
4 changes: 2 additions & 2 deletions _requirements/default.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
setuptools==65.*
setuptools==67.4.0
matplotlib>=3.0.0, <3.4.0
ipython[notebook]>=8.0.0, <8.9.0
ipython[notebook]>=8.0.0, <8.12.0
torch>=1.8.1, <1.14.0
pytorch-lightning>=1.4, <2.0.0
torchmetrics>=0.7, <0.12
11 changes: 6 additions & 5 deletions course_UvA-DL/09-normalizing-flows/NF_image_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,13 +799,13 @@ def forward(self, x):


class LayerNormChannels(nn.Module):
def __init__(self, c_in):
"""This module applies layer norm across channels in an image.

Has been shown to work well with ResNet connections.
def __init__(self, c_in, eps=1e-5):
"""
This module applies layer norm across channels in an image.

Args:
c_in: Number of channels of the input
eps: Small constant to stabilize std
"""
super().__init__()
self.gamma = nn.Parameter(torch.ones(1, c_in, 1, 1))
Expand Down Expand Up @@ -1252,7 +1252,8 @@ def print_num_params(model):
# %%
@torch.no_grad()
def interpolate(model, img1, img2, num_steps=8):
"""
"""Interpolate.

Args:
model: object of ImageFlow class that represents the (trained) flow model
img1, img2: Image tensors of shape [1, 28, 28]. Images between which should be interpolated.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.