Skip to content

Commit

Permalink
all warnings gone
Browse files Browse the repository at this point in the history
  • Loading branch information
liopeer committed Apr 14, 2024
1 parent e11ac7e commit 34a4ef1
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 1,383 deletions.
1 change: 0 additions & 1 deletion diffusion_models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
version = "0.0.1"
4 changes: 2 additions & 2 deletions diffusion_models/losses/kl_divergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def gaussian_kl(
) -> Float[Tensor, "1"]:
"""Calculate KL Divergence of 2 Gaussian distributions.
KL divergence between two univariate Gaussians, as derived in [1], with k=1 (dimensionality).
KL divergence between two univariate Gaussians, as derived in [1]_, with k=1 (dimensionality).
Parameters
----------
Expand Down Expand Up @@ -42,7 +42,7 @@ def log_gaussian_kl(
) -> Float[Tensor, "1"]:
"""Calculate KL Divergence of 2 Gaussian distributions.
KL divergence between two univariate Gaussians, as derived in [1], with k=1 (dimensionality) and log variances.
KL divergence between two univariate Gaussians, as derived in [1]_, with k=1 (dimensionality) and log variances.
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions diffusion_models/models/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from torch import nn, Tensor
from jaxtyping import Float, Int64, Int
from typing import Literal, Tuple, Union, List
from models.positional_encoding import PositionalEncoding
from diffusion_models.models.positional_encoding import PositionalEncoding
import math
from models.unet import UNet
from diffusion_models.models.unet import UNet

class ForwardDiffusion(nn.Module):
"""Class for forward diffusion process in DDPMs (denoising diffusion probabilistic models).
Expand Down
2 changes: 1 addition & 1 deletion diffusion_models/models/multicoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, channel_factors: List[int]=(4, 8, 16, 32), kernel_size: int=3
This class takes every coil independently (treats them like a sub-fraction of a batch), increases the channel size
massively (from 2 initial channels for complex k-space data) via several convolutional layers and then averages
those channels over the coil dimension. Averaging is invariant to permutations of the input order, so the coil order
or the number of coils will not matter anymore. Inspiration was drawn from point cloud processing, see below.
or the number of coils will not matter anymore. Inspiration was drawn from point cloud processing [1]_, see below.
.. [1] Qi et al., PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation, 2017
Expand Down
245 changes: 0 additions & 245 deletions diffusion_models/models/repaint_unet/fp16_util.py

This file was deleted.

Loading

0 comments on commit 34a4ef1

Please sign in to comment.