diff --git a/_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl.html b/_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl.html index 68aa80c..760e1a3 100644 --- a/_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl.html +++ b/_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl.html @@ -111,10 +111,10 @@

diffusion_models.losses.kl_divergence.gaussian_kl
Parameters:
    -
  • p_mean (Float[Tensor, '1']) – mean value of first distribution

  • -
  • p_var (Float[Tensor, '1']) – variance value of first distribution

  • -
  • q_mean (Float[Tensor, '1']) – mean value of second distribution

  • -
  • q_var (Float[Tensor, '1']) – variance value of second distribution

  • +
  • p_mean (Float[Tensor, '1']) – mean value of first distribution

  • +
  • p_var (Float[Tensor, '1']) – variance value of first distribution

  • +
  • q_mean (Float[Tensor, '1']) – mean value of second distribution

  • +
  • q_var (Float[Tensor, '1']) – variance value of second distribution

Returns:
diff --git a/_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl.html b/_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl.html index b3cc56e..ba3fe54 100644 --- a/_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl.html +++ b/_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl.html @@ -111,10 +111,10 @@

diffusion_models.losses.kl_divergence.log_gaussian_kl
Parameters:
    -
  • p_mean (Float[Tensor, '1']) – mean value of first distribution

  • -
  • p_logvar (Float[Tensor, '1']) – log of variance value of first distribution

  • -
  • q_mean (Float[Tensor, '1']) – mean value of second distribution

  • -
  • q_logvar (Float[Tensor, '1']) – log of variance value of second distribution

  • +
  • p_mean (Float[Tensor, '1']) – mean value of first distribution

  • +
  • p_logvar (Float[Tensor, '1']) – log of variance value of first distribution

  • +
  • q_mean (Float[Tensor, '1']) – mean value of second distribution

  • +
  • q_logvar (Float[Tensor, '1']) – log of variance value of second distribution

Returns:
diff --git a/_autosummary/diffusion_models.models.html b/_autosummary/diffusion_models.models.html index af11b6a..75ffc86 100644 --- a/_autosummary/diffusion_models.models.html +++ b/_autosummary/diffusion_models.models.html @@ -49,6 +49,7 @@
  • API Reference
  • +
  • diffusion_models.models.multicoil
  • diffusion_models.models.positional_encoding
  • diffusion_models.models.unet
  • diffusion_models.models.vae
  • diff --git a/_autosummary/diffusion_models.models.multicoil.MultiCoilConv2d.html b/_autosummary/diffusion_models.models.multicoil.MultiCoilConv2d.html new file mode 100644 index 0000000..cfc1613 --- /dev/null +++ b/_autosummary/diffusion_models.models.multicoil.MultiCoilConv2d.html @@ -0,0 +1,325 @@ + + + + + + + diffusion_models.models.multicoil.MultiCoilConv2d — DiffusionMRI 0.0.1 documentation + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +

    diffusion_models.models.multicoil.MultiCoilConv2d

    +
    +
    +class diffusion_models.models.multicoil.MultiCoilConv2d(*args, **kwargs)
    +

    Bases: Module

    +

    Initializes internal Module state, shared by both nn.Module and ScriptModule.

    +

    Methods

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    add_module(name, module)

    Adds a child module to the current module.

    apply(fn)

    Applies fn recursively to every submodule (as returned by .children()) as well as self.

    bfloat16()

    Casts all floating point parameters and buffers to bfloat16 datatype.

    buffers([recurse])

    Returns an iterator over module buffers.

    children()

    Returns an iterator over immediate children modules.

    compile(*args, **kwargs)

    Compile this Module's forward using torch.compile().

    cpu()

    Moves all model parameters and buffers to the CPU.

    cuda([device])

    Moves all model parameters and buffers to the GPU.

    double()

    Casts all floating point parameters and buffers to double datatype.

    eval()

    Sets the module in evaluation mode.

    extra_repr()

    Set the extra representation of the module

    float()

    Casts all floating point parameters and buffers to float datatype.

    forward(x)

    Defines the computation performed at every call.

    get_buffer(target)

    Returns the buffer given by target if it exists, otherwise throws an error.

    get_extra_state()

    Returns any extra state to include in the module's state_dict.

    get_parameter(target)

    Returns the parameter given by target if it exists, otherwise throws an error.

    get_submodule(target)

    Returns the submodule given by target if it exists, otherwise throws an error.

    half()

    Casts all floating point parameters and buffers to half datatype.

    ipu([device])

    Moves all model parameters and buffers to the IPU.

    load_state_dict(state_dict[, strict, assign])

    Copies parameters and buffers from state_dict into this module and its descendants.

    modules()

    Returns an iterator over all modules in the network.

    named_buffers([prefix, recurse, ...])

    Returns an iterator over module buffers, yielding both the name of the buffer as well as the buffer itself.

    named_children()

    Returns an iterator over immediate children modules, yielding both the name of the module as well as the module itself.

    named_modules([memo, prefix, remove_duplicate])

    Returns an iterator over all modules in the network, yielding both the name of the module as well as the module itself.

    named_parameters([prefix, recurse, ...])

    Returns an iterator over module parameters, yielding both the name of the parameter as well as the parameter itself.

    parameters([recurse])

    Returns an iterator over module parameters.

    register_backward_hook(hook)

    Registers a backward hook on the module.

    register_buffer(name, tensor[, persistent])

    Adds a buffer to the module.

    register_forward_hook(hook, *[, prepend, ...])

    Registers a forward hook on the module.

    register_forward_pre_hook(hook, *[, ...])

    Registers a forward pre-hook on the module.

    register_full_backward_hook(hook[, prepend])

    Registers a backward hook on the module.

    register_full_backward_pre_hook(hook[, prepend])

    Registers a backward pre-hook on the module.

    register_load_state_dict_post_hook(hook)

    Registers a post hook to be run after module's load_state_dict is called.

    register_module(name, module)

    Alias for add_module().

    register_parameter(name, param)

    Adds a parameter to the module.

    register_state_dict_pre_hook(hook)

    These hooks will be called with arguments: self, prefix, and keep_vars before calling state_dict on self.

    requires_grad_([requires_grad])

    Change if autograd should record operations on parameters in this module.

    set_extra_state(state)

    This function is called from load_state_dict() to handle any extra state found within the state_dict.

    share_memory()

    See torch.Tensor.share_memory_()

    state_dict(*args[, destination, prefix, ...])

    Returns a dictionary containing references to the whole state of the module.

    to(*args, **kwargs)

    Moves and/or casts the parameters and buffers.

    to_empty(*, device[, recurse])

    Moves the parameters and buffers to the specified device without copying storage.

    train([mode])

    Sets the module in training mode.

    type(dst_type)

    Casts all parameters and buffers to dst_type.

    xpu([device])

    Moves all model parameters and buffers to the XPU.

    zero_grad([set_to_none])

    Resets gradients of all model parameters.

    +

    Attributes

    + + + + + + + + + + + + + + + +

    T_destination

    call_super_init

    dump_patches

    training

    +
    +
    +forward(x)
    +

    Defines the computation performed at every call.

    +

    Should be overridden by all subclasses. +:rtype: Float[Tensor, 'batch coils out_channels height width']

    +
    +

    Note

    +

    Although the recipe for forward pass needs to be defined within +this function, one should call the Module instance afterwards +instead of this since the former takes care of running the +registered hooks while the latter silently ignores them.

    +
    +
    + +
    + +
    + + +
    +
    + +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/_autosummary/diffusion_models.models.multicoil.MultiCoilReducer.html b/_autosummary/diffusion_models.models.multicoil.MultiCoilReducer.html new file mode 100644 index 0000000..8c9f491 --- /dev/null +++ b/_autosummary/diffusion_models.models.multicoil.MultiCoilReducer.html @@ -0,0 +1,343 @@ + + + + + + + diffusion_models.models.multicoil.MultiCoilReducer — DiffusionMRI 0.0.1 documentation + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +

    diffusion_models.models.multicoil.MultiCoilReducer

    +
    +
    +class diffusion_models.models.multicoil.MultiCoilReducer(channel_factors=(4, 8, 16, 32), kernel_size=3)
    +

    Bases: Module

    +

    Constructor of MultiCoilReducer Class.

    +

    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.

    + +
    +
    Parameters:
    +
      +
    • channel_factors (List[int]) – sequence that includes all factors for channel increases

    • +
    • kernel_size (int) – kernel size for conv layers

    • +
    +
    +
    +

    Methods

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    add_module(name, module)

    Adds a child module to the current module.

    apply(fn)

    Applies fn recursively to every submodule (as returned by .children()) as well as self.

    bfloat16()

    Casts all floating point parameters and buffers to bfloat16 datatype.

    buffers([recurse])

    Returns an iterator over module buffers.

    children()

    Returns an iterator over immediate children modules.

    compile(*args, **kwargs)

    Compile this Module's forward using torch.compile().

    cpu()

    Moves all model parameters and buffers to the CPU.

    cuda([device])

    Moves all model parameters and buffers to the GPU.

    double()

    Casts all floating point parameters and buffers to double datatype.

    eval()

    Sets the module in evaluation mode.

    extra_repr()

    Set the extra representation of the module

    float()

    Casts all floating point parameters and buffers to float datatype.

    forward(x)

    Defines the computation performed at every call.

    get_buffer(target)

    Returns the buffer given by target if it exists, otherwise throws an error.

    get_extra_state()

    Returns any extra state to include in the module's state_dict.

    get_parameter(target)

    Returns the parameter given by target if it exists, otherwise throws an error.

    get_submodule(target)

    Returns the submodule given by target if it exists, otherwise throws an error.

    half()

    Casts all floating point parameters and buffers to half datatype.

    ipu([device])

    Moves all model parameters and buffers to the IPU.

    load_state_dict(state_dict[, strict, assign])

    Copies parameters and buffers from state_dict into this module and its descendants.

    modules()

    Returns an iterator over all modules in the network.

    named_buffers([prefix, recurse, ...])

    Returns an iterator over module buffers, yielding both the name of the buffer as well as the buffer itself.

    named_children()

    Returns an iterator over immediate children modules, yielding both the name of the module as well as the module itself.

    named_modules([memo, prefix, remove_duplicate])

    Returns an iterator over all modules in the network, yielding both the name of the module as well as the module itself.

    named_parameters([prefix, recurse, ...])

    Returns an iterator over module parameters, yielding both the name of the parameter as well as the parameter itself.

    parameters([recurse])

    Returns an iterator over module parameters.

    register_backward_hook(hook)

    Registers a backward hook on the module.

    register_buffer(name, tensor[, persistent])

    Adds a buffer to the module.

    register_forward_hook(hook, *[, prepend, ...])

    Registers a forward hook on the module.

    register_forward_pre_hook(hook, *[, ...])

    Registers a forward pre-hook on the module.

    register_full_backward_hook(hook[, prepend])

    Registers a backward hook on the module.

    register_full_backward_pre_hook(hook[, prepend])

    Registers a backward pre-hook on the module.

    register_load_state_dict_post_hook(hook)

    Registers a post hook to be run after module's load_state_dict is called.

    register_module(name, module)

    Alias for add_module().

    register_parameter(name, param)

    Adds a parameter to the module.

    register_state_dict_pre_hook(hook)

    These hooks will be called with arguments: self, prefix, and keep_vars before calling state_dict on self.

    requires_grad_([requires_grad])

    Change if autograd should record operations on parameters in this module.

    set_extra_state(state)

    This function is called from load_state_dict() to handle any extra state found within the state_dict.

    share_memory()

    See torch.Tensor.share_memory_()

    state_dict(*args[, destination, prefix, ...])

    Returns a dictionary containing references to the whole state of the module.

    to(*args, **kwargs)

    Moves and/or casts the parameters and buffers.

    to_empty(*, device[, recurse])

    Moves the parameters and buffers to the specified device without copying storage.

    train([mode])

    Sets the module in training mode.

    type(dst_type)

    Casts all parameters and buffers to dst_type.

    xpu([device])

    Moves all model parameters and buffers to the XPU.

    zero_grad([set_to_none])

    Resets gradients of all model parameters.

    +

    Attributes

    + + + + + + + + + + + + + + + +

    T_destination

    call_super_init

    dump_patches

    training

    +
    +
    +forward(x)
    +

    Defines the computation performed at every call.

    +

    Should be overridden by all subclasses. +:rtype: Float[Tensor, 'batch out_channels height width']

    +
    +

    Note

    +

    Although the recipe for forward pass needs to be defined within +this function, one should call the Module instance afterwards +instead of this since the former takes care of running the +registered hooks while the latter silently ignores them.

    +
    +
    + +
    + +
    + + +
    +
    + +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/_autosummary/diffusion_models.models.multicoil.html b/_autosummary/diffusion_models.models.multicoil.html new file mode 100644 index 0000000..128b3d7 --- /dev/null +++ b/_autosummary/diffusion_models.models.multicoil.html @@ -0,0 +1,153 @@ + + + + + + + diffusion_models.models.multicoil — DiffusionMRI 0.0.1 documentation + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +

    diffusion_models.models.multicoil

    +

    Classes

    + + + + + + + + + +

    MultiCoilConv2d(*args, **kwargs)

    Initializes internal Module state, shared by both nn.Module and ScriptModule.

    MultiCoilReducer([channel_factors, kernel_size])

    Constructor of MultiCoilReducer Class.

    +
    + + +
    +
    + +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding.html b/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding.html index f9c0789..a0a778a 100644 --- a/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding.html +++ b/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding.html @@ -49,6 +49,7 @@
  • API Reference
    • diffusion_models.models
      • diffusion_models.models.mnist_enc
      • +
      • diffusion_models.models.multicoil
      • diffusion_models.models.positional_encoding
        • diffusion_models.models.positional_encoding.PositionalEncoding
        • diffusion_models.models.positional_encoding.PositionalEncoding2D
        • @@ -114,9 +115,9 @@

          diffusion_models.models.positional_encoding.PositionalEncoding
          Parameters:
            -
          • d_model (int) – feature dimensionality of the model

          • -
          • dropout (float) – probability value of dropout layers

          • -
          • max_len (int) – maximum length of sequence (shorter setting will free up GPU memory)

          • +
          • d_model (int) – feature dimensionality of the model

          • +
          • dropout (float) – probability value of dropout layers

          • +
          • max_len (int) – maximum length of sequence (shorter setting will free up GPU memory)

          @@ -162,7 +163,7 @@

          diffusion_models.models.positional_encoding.PositionalEncoding

          forward(x)

          type x:
          -

          Float[Tensor, 'length batch features']

          +

          Float[Tensor, 'length batch features']

          @@ -293,7 +294,7 @@

          diffusion_models.models.positional_encoding.PositionalEncodingforward(x)
          Parameters:
          -

          x (Float[Tensor, 'length batch features']) – input sequence

          +

          x (Float[Tensor, 'length batch features']) – input sequence

          Returns:

          output sequence with added positional encoding

          @@ -310,7 +311,7 @@

          diffusion_models.models.positional_encoding.PositionalEncoding
          Parameters:
          -

          t (Int64[Tensor, 'batch']) – timesteps to get positional encoding for (one batch)

          +

          t (Int64[Tensor, 'batch']) – timesteps to get positional encoding for (one batch)

          Returns:

          positional encodings for batch

          diff --git a/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D.html b/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D.html index 6532ee4..92dde33 100644 --- a/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D.html +++ b/_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D.html @@ -49,6 +49,7 @@
        • API Reference
        • @@ -294,13 +295,13 @@

          diffusion_models.models.unet.AttentionDecodingBlock
          Parameters:
            -
          • x (Tensor) – input tensor

          • -
          • skip (Tensor) – skip connection to be merged

          • -
          • time_embedding (Optional[Tensor]) – time embedding tensor

          • +
          • x (Tensor) – input tensor

          • +
          • skip (Tensor) – skip connection to be merged

          • +
          • time_embedding (Optional[Tensor]) – time embedding tensor

          Return type:
          -

          Tensor

          +

          Tensor

          Returns:

          output tensor

          diff --git a/_autosummary/diffusion_models.models.unet.AttentionEncodingBlock.html b/_autosummary/diffusion_models.models.unet.AttentionEncodingBlock.html index f4a23da..3800032 100644 --- a/_autosummary/diffusion_models.models.unet.AttentionEncodingBlock.html +++ b/_autosummary/diffusion_models.models.unet.AttentionEncodingBlock.html @@ -49,6 +49,7 @@
        • API Reference
          • diffusion_models.models
            • diffusion_models.models.mnist_enc
            • +
            • diffusion_models.models.multicoil
            • diffusion_models.models.positional_encoding
            • diffusion_models.models.unet
              • diffusion_models.models.unet.AttentionDecodingBlock
              • @@ -118,13 +119,13 @@

                diffusion_models.models.unet.AttentionEncodingBlock
                Parameters:
                  -
                • in_channels (int) – number of input channels

                • -
                • out_channels (int) – number of output channels

                • -
                • time_embedding_size (int) – dimension of time embedding

                • -
                • kernel_size (int) – size of convolutional kernel

                • -
                • dropout (float) – probability of dropout layers

                • -
                • activation (Module) – non-linearity of neural network

                • -
                • verbose (bool) – whether to print tensor shapes in forward pass

                • +
                • in_channels (int) – number of input channels

                • +
                • out_channels (int) – number of output channels

                • +
                • time_embedding_size (int) – dimension of time embedding

                • +
                • kernel_size (int) – size of convolutional kernel

                • +
                • dropout (float) – probability of dropout layers

                • +
                • activation (Module) – non-linearity of neural network

                • +
                • verbose (bool) – whether to print tensor shapes in forward pass

                @@ -295,12 +296,12 @@

                diffusion_models.models.unet.AttentionEncodingBlock
                Parameters:
                  -
                • x (Tensor) – input tensor

                • -
                • time_embedding (Tensor) – time embedding tensor

                • +
                • x (Tensor) – input tensor

                • +
                • time_embedding (Tensor) – time embedding tensor

                Return type:
                -

                Tuple[Tensor, Tensor]

                +

                Tuple[Tensor, Tensor]

                Returns:

                  diff --git a/_autosummary/diffusion_models.models.unet.DecodingBlock.html b/_autosummary/diffusion_models.models.unet.DecodingBlock.html index b6593fe..537d977 100644 --- a/_autosummary/diffusion_models.models.unet.DecodingBlock.html +++ b/_autosummary/diffusion_models.models.unet.DecodingBlock.html @@ -49,6 +49,7 @@
                • API Reference
                  • diffusion_models.models
                    • diffusion_models.models.mnist_enc
                    • +
                    • diffusion_models.models.multicoil
                    • diffusion_models.models.positional_encoding
                    • diffusion_models.models.unet
                      • diffusion_models.models.unet.AttentionDecodingBlock
                      • @@ -118,12 +119,12 @@

                        diffusion_models.models.unet.DecodingBlock
                        Parameters:
                          -
                        • in_channels (int) – number of input channels

                        • -
                        • out_channels (int) – number of output channels

                        • -
                        • time_embedding_size (int) – dimension of time embedding

                        • -
                        • kernel_size (int) – size of convolutional kernel

                        • -
                        • dropout (float) – dropout probability of dropout layers

                        • -
                        • verbose (bool) – whether to print tensor shapes during forward pass

                        • +
                        • in_channels (int) – number of input channels

                        • +
                        • out_channels (int) – number of output channels

                        • +
                        • time_embedding_size (int) – dimension of time embedding

                        • +
                        • kernel_size (int) – size of convolutional kernel

                        • +
                        • dropout (float) – dropout probability of dropout layers

                        • +
                        • verbose (bool) – whether to print tensor shapes during forward pass

                        @@ -294,13 +295,13 @@

                        diffusion_models.models.unet.DecodingBlock
                        Parameters:
                          -
                        • x (Float[Tensor, 'batch channels height width']) – input tensor

                        • -
                        • skip (Float[Tensor, 'batch half_channels double_height double_width']) – skip connection to be merged

                        • -
                        • time_embedding (Optional[Float[Tensor, 'batch embedding_size']]) – time embedding tensor

                        • +
                        • x (Float[Tensor, 'batch channels height width']) – input tensor

                        • +
                        • skip (Float[Tensor, 'batch half_channels double_height double_width']) – skip connection to be merged

                        • +
                        • time_embedding (Optional[Float[Tensor, 'batch embedding_size']]) – time embedding tensor

                        Return type:
                        -

                        Float[Tensor, 'batch half_channels double_height double_width']

                        +

                        Float[Tensor, 'batch half_channels double_height double_width']

                        Returns:

                        output tensor

                        diff --git a/_autosummary/diffusion_models.models.unet.EncodingBlock.html b/_autosummary/diffusion_models.models.unet.EncodingBlock.html index 4d50258..23c1cad 100644 --- a/_autosummary/diffusion_models.models.unet.EncodingBlock.html +++ b/_autosummary/diffusion_models.models.unet.EncodingBlock.html @@ -49,6 +49,7 @@
                      • API Reference
                        • diffusion_models.models
                          • diffusion_models.models.mnist_enc
                          • +
                          • diffusion_models.models.multicoil
                          • diffusion_models.models.positional_encoding
                          • diffusion_models.models.unet
                            • diffusion_models.models.unet.AttentionDecodingBlock
                            • @@ -118,13 +119,13 @@

                              diffusion_models.models.unet.EncodingBlock
                              Parameters:
                                -
                              • in_channels (int) – number of input channels

                              • -
                              • out_channels (int) – number of output channels

                              • -
                              • time_embedding_size (int) – dimension of time embedding

                              • -
                              • kernel_size (int) – size of convolutional kernel

                              • -
                              • dropout (float) – probability of dropout layers

                              • -
                              • activation (Module) – non-linearity of neural network

                              • -
                              • verbose (bool) – whether to print tensor shapes in forward pass

                              • +
                              • in_channels (int) – number of input channels

                              • +
                              • out_channels (int) – number of output channels

                              • +
                              • time_embedding_size (int) – dimension of time embedding

                              • +
                              • kernel_size (int) – size of convolutional kernel

                              • +
                              • dropout (float) – probability of dropout layers

                              • +
                              • activation (Module) – non-linearity of neural network

                              • +
                              • verbose (bool) – whether to print tensor shapes in forward pass

                              @@ -295,12 +296,12 @@

                              diffusion_models.models.unet.EncodingBlock
                              Parameters:
                                -
                              • x (Float[Tensor, 'batch channels height width']) – input tensor

                              • -
                              • time_embedding (Float[Tensor, 'batch embedding_size']) – time embedding tensor

                              • +
                              • x (Float[Tensor, 'batch channels height width']) – input tensor

                              • +
                              • time_embedding (Float[Tensor, 'batch embedding_size']) – time embedding tensor

                              Return type:
                              -

                              Tuple[Float[Tensor, 'batch double_channels half_height half_width'], Float[Tensor, 'batch double_channels height width']]

                              +

                              Tuple[Float[Tensor, 'batch double_channels half_height half_width'], Float[Tensor, 'batch double_channels height width']]

                              Returns:

                                diff --git a/_autosummary/diffusion_models.models.unet.SelfAttention.html b/_autosummary/diffusion_models.models.unet.SelfAttention.html index 5a8ecc6..d2ab89b 100644 --- a/_autosummary/diffusion_models.models.unet.SelfAttention.html +++ b/_autosummary/diffusion_models.models.unet.SelfAttention.html @@ -49,6 +49,7 @@
                              • API Reference
                                • diffusion_models.models
                                  • diffusion_models.models.mnist_enc
                                  • +
                                  • diffusion_models.models.multicoil
                                  • diffusion_models.models.positional_encoding
                                  • diffusion_models.models.unet
                                    • diffusion_models.models.unet.AttentionDecodingBlock
                                    • @@ -119,11 +120,11 @@

                                      diffusion_models.models.unet.SelfAttention
                                      Parameters:
                                        -
                                      • channels (int) – number of input channels

                                      • -
                                      • num_heads (int) – number of desired attention heads

                                      • -
                                      • dropout (float) – dropout probability value

                                      • -
                                      • dim_feedforward (Optional[int]) – dimension of hidden layers in feedforward NN, defaults to number of input channels

                                      • -
                                      • activation (Module) – activation function to be used, as uninstantiated nn.Module

                                      • +
                                      • channels (int) – number of input channels

                                      • +
                                      • num_heads (int) – number of desired attention heads

                                      • +
                                      • dropout (float) – dropout probability value

                                      • +
                                      • dim_feedforward (Optional[int]) – dimension of hidden layers in feedforward NN, defaults to number of input channels

                                      • +
                                      • activation (Module) – activation function to be used, as uninstantiated nn.Module

                                      @@ -293,7 +294,7 @@

                                      diffusion_models.models.unet.SelfAttention
                                      Parameters:
                                      -

                                      x (Float[Tensor, 'batch channels height width']) – input tensor

                                      +

                                      x (Float[Tensor, 'batch channels height width']) – input tensor

                                      Returns:

                                      output tensor

                                      diff --git a/_autosummary/diffusion_models.models.unet.UNet.html b/_autosummary/diffusion_models.models.unet.UNet.html index d7b0c7e..d55bae8 100644 --- a/_autosummary/diffusion_models.models.unet.UNet.html +++ b/_autosummary/diffusion_models.models.unet.UNet.html @@ -49,6 +49,7 @@
                                    • API Reference
                                      • diffusion_models.models
                                        • diffusion_models.models.mnist_enc
                                        • +
                                        • diffusion_models.models.multicoil
                                        • diffusion_models.models.positional_encoding
                                        • diffusion_models.models.unet
                                          • diffusion_models.models.unet.AttentionDecodingBlock
                                          • @@ -143,67 +144,67 @@

                                            Images sizes
                                            type num_encoding_blocks:
                                            -

                                            int

                                            +

                                            int

                                            param num_encoding_blocks:

                                            how many basic encoder building blocks; each block will double the channels and half the resolution

                                            type in_channels:
                                            -

                                            int

                                            +

                                            int

                                            param in_channels:

                                            start channels, e.g. 1 or 3

                                            type kernel_size:
                                            -

                                            int

                                            +

                                            int

                                            param kernel_size:

                                            size of convolutional kernels

                                            type time_emb_size:
                                            -

                                            int

                                            +

                                            int

                                            param time_emb_size:

                                            initial size of time step encoding

                                            type dropout:
                                            -

                                            float

                                            +

                                            float

                                            param dropout:

                                            probability parameter of dropout layers

                                            type activation:
                                            -

                                            Module

                                            +

                                            Module

                                            param activation:

                                            activation function to be used

                                            type verbose:
                                            -

                                            bool

                                            +

                                            bool

                                            param verbose:

                                            verbose printing of tensor shapes for debbugging

                                            type init_channels:
                                            -

                                            int

                                            +

                                            int

                                            param init_channels:

                                            number of channels to initially transform the input to (usually 64, 128, …)

                                            type attention:
                                            -

                                            bool

                                            +

                                            bool

                                            param attention:

                                            whether to use self-attention layers

                                            type attention_heads:
                                            -

                                            int

                                            +

                                            int

                                            param attention_heads:

                                            number of attention heads to be used

                                            type attention_ff_dim:
                                            -

                                            Optional[int]

                                            +

                                            Optional[int]

                                            param attention_ff_dim:

                                            hidden dimension of feedforward layer in self attention module, None defaults to input dimension

                                            @@ -376,8 +377,8 @@

                                            Images sizes
                                            Parameters:
                                              -
                                            • x (Float[Tensor, 'batch channels height width']) – input image batch

                                            • -
                                            • t (Optional[Float[Tensor, 'batch embedding_size']]) – time embedding

                                            • +
                                            • x (Float[Tensor, 'batch channels height width']) – input image batch

                                            • +
                                            • t (Optional[Float[Tensor, 'batch embedding_size']]) – time embedding

                                            Returns:
                                            diff --git a/_autosummary/diffusion_models.models.unet.html b/_autosummary/diffusion_models.models.unet.html index 0171d23..51ff9b4 100644 --- a/_autosummary/diffusion_models.models.unet.html +++ b/_autosummary/diffusion_models.models.unet.html @@ -49,6 +49,7 @@
                                          • API Reference
                                            • diffusion_models.models
                                              • diffusion_models.models.mnist_enc
                                              • +
                                              • diffusion_models.models.multicoil
                                              • diffusion_models.models.positional_encoding
                                              • diffusion_models.models.unet
                                                • diffusion_models.models.unet.AttentionDecodingBlock
                                                • diff --git a/_autosummary/diffusion_models.models.vae.ResNet18Decoder.html b/_autosummary/diffusion_models.models.vae.ResNet18Decoder.html index 5f0e5a9..0adfc4a 100644 --- a/_autosummary/diffusion_models.models.vae.ResNet18Decoder.html +++ b/_autosummary/diffusion_models.models.vae.ResNet18Decoder.html @@ -49,6 +49,7 @@
                                                • API Reference
                                                  • diffusion_models.models
                                                    • diffusion_models.models.mnist_enc
                                                    • +
                                                    • diffusion_models.models.multicoil
                                                    • diffusion_models.models.positional_encoding
                                                    • diffusion_models.models.unet
                                                    • diffusion_models.models.vae
                                                        @@ -281,7 +282,7 @@

                                                        diffusion_models.models.vae.ResNet18Decoderforward(x)

                                                        Defines the computation performed at every call.

                                                        Should be overridden by all subclasses. -:rtype: Float[Tensor, 'batch channels height width']

                                                        +:rtype: Float[Tensor, 'batch channels height width']

                                                        Note

                                                        Although the recipe for forward pass needs to be defined within diff --git a/_autosummary/diffusion_models.models.vae.ResNet18Encoder.html b/_autosummary/diffusion_models.models.vae.ResNet18Encoder.html index 966b657..9a7fbfb 100644 --- a/_autosummary/diffusion_models.models.vae.ResNet18Encoder.html +++ b/_autosummary/diffusion_models.models.vae.ResNet18Encoder.html @@ -49,6 +49,7 @@

                                                      • API Reference
                                                        • diffusion_models.models
                                                          • diffusion_models.models.mnist_enc
                                                          • +
                                                          • diffusion_models.models.multicoil
                                                          • diffusion_models.models.positional_encoding
                                                          • diffusion_models.models.unet
                                                          • diffusion_models.models.vae
                                                              @@ -300,7 +301,7 @@

                                                              Implementationforward(x)

                                                              Defines the computation performed at every call.

                                                              Should be overridden by all subclasses. -:rtype: Tuple[Float[Tensor, 'batch hidden_dim'], Float[Tensor, 'batch hidden_dim']]

                                                              +:rtype: Tuple[Float[Tensor, 'batch hidden_dim'], Float[Tensor, 'batch hidden_dim']]

                                                              Note

                                                              Although the recipe for forward pass needs to be defined within diff --git a/_autosummary/diffusion_models.models.vae.ResNetBlock.html b/_autosummary/diffusion_models.models.vae.ResNetBlock.html index eb7e522..13b3105 100644 --- a/_autosummary/diffusion_models.models.vae.ResNetBlock.html +++ b/_autosummary/diffusion_models.models.vae.ResNetBlock.html @@ -49,6 +49,7 @@

                                                            • API Reference
                                                              • diffusion_models.models
                                                                • diffusion_models.models.mnist_enc
                                                                • +
                                                                • diffusion_models.models.multicoil
                                                                • diffusion_models.models.positional_encoding
                                                                • diffusion_models.models.unet
                                                                • diffusion_models.models.vae +

                                                                  C

                                                                  + + +
                                                                  +

                                                                  D

                                                                  +

                                                                  N

                                                                  diff --git a/objects.inv b/objects.inv index 8708f60..d404a21 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html index e753655..647e8f4 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -121,6 +121,11 @@

                                                                  Python Module Index

                                                                      diffusion_models.models.mnist_enc + + +     + diffusion_models.models.multicoil +     diff --git a/searchindex.js b/searchindex.js index 4fbea22..f17190b 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["_autosummary/diffusion_models.losses", "_autosummary/diffusion_models.losses.kl_divergence", "_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl", "_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl", "_autosummary/diffusion_models.models", "_autosummary/diffusion_models.models.mnist_enc", "_autosummary/diffusion_models.models.mnist_enc.MNISTEncoder", "_autosummary/diffusion_models.models.positional_encoding", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D", "_autosummary/diffusion_models.models.unet", "_autosummary/diffusion_models.models.unet.AttentionDecodingBlock", "_autosummary/diffusion_models.models.unet.AttentionEncodingBlock", "_autosummary/diffusion_models.models.unet.DecodingBlock", "_autosummary/diffusion_models.models.unet.EncodingBlock", "_autosummary/diffusion_models.models.unet.SelfAttention", "_autosummary/diffusion_models.models.unet.UNet", "_autosummary/diffusion_models.models.vae", "_autosummary/diffusion_models.models.vae.ResNet18Decoder", "_autosummary/diffusion_models.models.vae.ResNet18Encoder", "_autosummary/diffusion_models.models.vae.ResNetBlock", "_autosummary/diffusion_models.models.vae.ResNetDecoderBlock", "_autosummary/diffusion_models.models.vae.SkipDownSampler", "_autosummary/diffusion_models.models.vae.SkipUpSampler", "_autosummary/diffusion_models.models.vae.VariationalAutoencoder", "_autosummary/diffusion_models.mri_forward", "_autosummary/diffusion_models.mri_forward.noise", "_autosummary/diffusion_models.mri_forward.noise.apply_add_gauss_noise", "_autosummary/diffusion_models.mri_forward.noise.apply_mult_gauss_noise", "_autosummary/diffusion_models.mri_forward.noise.independent_gauss_noise", "_autosummary/diffusion_models.mri_forward.undersampling_mask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.UndersamplingMask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d", "_autosummary/diffusion_models.mri_forward.undersampling_mask.normalize_mask", "_autosummary/diffusion_models.utils", "_autosummary/diffusion_models.utils.helpers", "_autosummary/diffusion_models.utils.helpers.bytes_to_gb", "_autosummary/diffusion_models.utils.helpers.dotdict", "_autosummary/diffusion_models.utils.mp_setup", "_autosummary/diffusion_models.utils.mp_setup.DDP_Proc_Group", "api", "chap/tex_stuff", "idea_corner", "index", "installation"], "filenames": ["_autosummary/diffusion_models.losses.rst", "_autosummary/diffusion_models.losses.kl_divergence.rst", "_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl.rst", "_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl.rst", "_autosummary/diffusion_models.models.rst", "_autosummary/diffusion_models.models.mnist_enc.rst", "_autosummary/diffusion_models.models.mnist_enc.MNISTEncoder.rst", "_autosummary/diffusion_models.models.positional_encoding.rst", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding.rst", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D.rst", "_autosummary/diffusion_models.models.unet.rst", "_autosummary/diffusion_models.models.unet.AttentionDecodingBlock.rst", "_autosummary/diffusion_models.models.unet.AttentionEncodingBlock.rst", "_autosummary/diffusion_models.models.unet.DecodingBlock.rst", "_autosummary/diffusion_models.models.unet.EncodingBlock.rst", "_autosummary/diffusion_models.models.unet.SelfAttention.rst", "_autosummary/diffusion_models.models.unet.UNet.rst", "_autosummary/diffusion_models.models.vae.rst", "_autosummary/diffusion_models.models.vae.ResNet18Decoder.rst", "_autosummary/diffusion_models.models.vae.ResNet18Encoder.rst", "_autosummary/diffusion_models.models.vae.ResNetBlock.rst", "_autosummary/diffusion_models.models.vae.ResNetDecoderBlock.rst", "_autosummary/diffusion_models.models.vae.SkipDownSampler.rst", "_autosummary/diffusion_models.models.vae.SkipUpSampler.rst", "_autosummary/diffusion_models.models.vae.VariationalAutoencoder.rst", "_autosummary/diffusion_models.mri_forward.rst", "_autosummary/diffusion_models.mri_forward.noise.rst", "_autosummary/diffusion_models.mri_forward.noise.apply_add_gauss_noise.rst", "_autosummary/diffusion_models.mri_forward.noise.apply_mult_gauss_noise.rst", "_autosummary/diffusion_models.mri_forward.noise.independent_gauss_noise.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.UndersamplingMask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.normalize_mask.rst", "_autosummary/diffusion_models.utils.rst", "_autosummary/diffusion_models.utils.helpers.rst", "_autosummary/diffusion_models.utils.helpers.bytes_to_gb.rst", "_autosummary/diffusion_models.utils.helpers.dotdict.rst", "_autosummary/diffusion_models.utils.mp_setup.rst", "_autosummary/diffusion_models.utils.mp_setup.DDP_Proc_Group.rst", "api.rst", "chap/tex_stuff.rst", "idea_corner.md", "index.rst", "installation.md"], "titles": ["diffusion_models.losses", "diffusion_models.losses.kl_divergence", "diffusion_models.losses.kl_divergence.gaussian_kl", "diffusion_models.losses.kl_divergence.log_gaussian_kl", "diffusion_models.models", "diffusion_models.models.mnist_enc", "diffusion_models.models.mnist_enc.MNISTEncoder", "diffusion_models.models.positional_encoding", "diffusion_models.models.positional_encoding.PositionalEncoding", "diffusion_models.models.positional_encoding.PositionalEncoding2D", "diffusion_models.models.unet", "diffusion_models.models.unet.AttentionDecodingBlock", "diffusion_models.models.unet.AttentionEncodingBlock", "diffusion_models.models.unet.DecodingBlock", "diffusion_models.models.unet.EncodingBlock", "diffusion_models.models.unet.SelfAttention", "diffusion_models.models.unet.UNet", "diffusion_models.models.vae", "diffusion_models.models.vae.ResNet18Decoder", "diffusion_models.models.vae.ResNet18Encoder", "diffusion_models.models.vae.ResNetBlock", "diffusion_models.models.vae.ResNetDecoderBlock", "diffusion_models.models.vae.SkipDownSampler", "diffusion_models.models.vae.SkipUpSampler", "diffusion_models.models.vae.VariationalAutoencoder", "diffusion_models.mri_forward", "diffusion_models.mri_forward.noise", "diffusion_models.mri_forward.noise.apply_add_gauss_noise", "diffusion_models.mri_forward.noise.apply_mult_gauss_noise", "diffusion_models.mri_forward.noise.independent_gauss_noise", "diffusion_models.mri_forward.undersampling_mask", "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask", "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask", "diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask", "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h", "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v", "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d", "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h", "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v", "diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d", "diffusion_models.mri_forward.undersampling_mask.normalize_mask", "diffusion_models.utils", "diffusion_models.utils.helpers", "diffusion_models.utils.helpers.bytes_to_gb", "diffusion_models.utils.helpers.dotdict", "diffusion_models.utils.mp_setup", "diffusion_models.utils.mp_setup.DDP_Proc_Group", "API", "Abstract", "Idea Corner", "Diffusion Models for MRI", "Installation"], "terms": {"function": [1, 6, 9, 15, 16, 18, 19, 20, 21, 22, 23, 24, 26, 30, 31, 32, 42, 46], "p_mean": [2, 3], "p_var": 2, "q_mean": [2, 3], "q_var": 2, "calcul": [2, 3, 48, 49], "kl": [2, 3, 48], "diverg": [2, 3], "2": [2, 3, 16, 19, 20, 21, 34, 35, 36, 37, 38, 39, 48, 49], "gaussian": [2, 3, 29, 34, 35, 36, 48], "distribut": [2, 3, 48], "between": [2, 3, 48], "two": [2, 3, 48], "univari": [2, 3], "deriv": [2, 3], "1": [2, 3, 8, 16, 34, 35, 36, 48, 49], "k": [2, 3], "dimension": [2, 3, 8], "paramet": [2, 3, 8, 11, 12, 13, 14, 15, 16, 34, 35, 36, 37, 38, 39, 48], "float": [2, 3, 8, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 34, 35, 36], "tensor": [2, 3, 8, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 27, 28, 29, 34, 35, 36, 37, 38, 39], "mean": [2, 3, 16, 48, 49], "valu": [2, 3, 8, 15, 48, 49], "first": [2, 3, 19], "varianc": [2, 3, 48, 49], "second": [2, 3, 19, 48], "return": [2, 3, 8, 11, 12, 13, 14, 15, 16, 34, 35, 36, 37, 38, 39, 46], "input": [2, 3, 8, 11, 12, 13, 14, 15, 16, 48], "type": [2, 3, 8, 11, 12, 13, 14, 15, 16, 33, 34, 35, 36, 37, 38, 39, 46], "out": [2, 3, 8, 15, 16, 48], "refer": [2, 3, 16, 48], "http": [2, 3, 48, 51], "mr": [2, 3], "easi": [2, 3, 48], "github": [2, 3, 51], "io": [2, 3], "2020": [2, 3, 48], "04": [2, 3], "16": [2, 3, 49], "p_logvar": 3, "q_logvar": 3, "log": 3, "class": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 30, 31, 32, 42, 44, 45, 46], "out_class": 6, "10": [6, 48], "kernel_s": [6, 11, 12, 13, 14, 16], "3": [6, 11, 12, 13, 14, 16, 18, 24, 48, 49], "base": [6, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32, 44, 46, 48, 49], "modul": [6, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32], "initi": [6, 9, 11, 12, 13, 14, 16, 18, 19, 22, 23, 24, 31, 32, 49], "intern": [6, 9, 18, 19, 22, 23, 24, 31, 32], "state": [6, 9, 18, 19, 22, 23, 24, 31, 32, 48], "share": [6, 9, 18, 19, 22, 23, 24, 31, 32], "both": [6, 9, 16, 18, 19, 22, 23, 24, 31, 32, 37, 38, 39, 48], "nn": [6, 9, 11, 12, 13, 14, 15, 16, 18, 19, 22, 23, 24, 31, 32, 48], "scriptmodul": [6, 9, 18, 19, 22, 23, 24, 31, 32], "method": [6, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32, 44, 46], "attribut": [6, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32, 44], "forward": [6, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32, 49], "x": [6, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32, 33, 48, 49], "defin": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48], "comput": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "perform": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48], "everi": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48, 49], "call": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 46, 48], "should": [6, 9, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48, 49], "overridden": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "all": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48, 49], "subclass": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "although": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "recip": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "pass": [6, 9, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48, 49], "need": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48], "within": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "thi": [6, 9, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32, 49, 50], "one": [6, 8, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 51], "instanc": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 49], "afterward": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "instead": [6, 9, 16, 18, 19, 20, 21, 22, 23, 24, 31, 32], "sinc": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 48], "former": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "take": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "care": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "run": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "regist": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "hook": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "while": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "latter": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "silent": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "ignor": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32, 49], "them": [6, 9, 18, 19, 20, 21, 22, 23, 24, 31, 32], "d_model": 8, "256": [8, 16, 18, 19, 24], "dropout": [8, 11, 12, 13, 14, 15, 16], "0": [8, 11, 12, 13, 14, 16, 48, 49], "max_len": 8, "5000": 8, "constructor": [8, 15, 16, 20, 21], "int": [8, 11, 12, 13, 14, 15, 16, 37, 38, 39, 48], "featur": [8, 49], "probabl": [8, 11, 12, 13, 14, 15, 16, 48], "layer": [8, 11, 12, 13, 14, 15, 16, 48, 49], "maximum": [8, 48], "length": 8, "sequenc": 8, "shorter": 8, "set": [8, 48, 49, 50], "free": 8, "up": [8, 48, 50], "gpu": 8, "memori": 8, "batch": [8, 13, 14, 15, 16, 18, 19, 20, 21, 48, 49], "output": [8, 11, 12, 13, 14, 15, 16, 19, 48], "ad": [8, 48], "posit": [8, 16], "encod": [8, 12, 14, 16, 19, 48], "get_pos_encod": 8, "t": [8, 16, 48, 49, 51], "get": [8, 48, 49, 50], "timestep": [8, 48], "int64": 8, "arg": [9, 46], "kwarg": [9, 46], "in_channel": [11, 12, 13, 14, 16, 19, 20, 21, 22, 23, 24], "out_channel": [11, 12, 13, 14, 18, 20, 21, 22, 23], "time_embedding_s": [11, 12, 13, 14], "5": [11, 12, 13, 14, 16, 48], "activ": [11, 12, 13, 14, 15, 16, 51], "torch": [11, 12, 13, 14, 15, 16, 49], "silu": [11, 12, 13, 14, 15, 16], "verbos": [11, 12, 13, 14, 16], "fals": [11, 12, 13, 14, 16, 49], "attention_head": [11, 12, 16], "4": [11, 12, 16, 19], "attention_ff_dim": [11, 12, 16], "none": [11, 12, 13, 15, 16, 31, 32, 46], "decodingblock": 11, "decod": [11, 13], "build": [11, 12, 13, 14, 16, 20], "block": [11, 12, 13, 14, 16, 19, 20], "number": [11, 12, 13, 14, 15, 16, 48], "channel": [11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 49], "dimens": [11, 12, 13, 14, 15, 16, 34, 35, 37, 38, 39, 48, 49], "time": [11, 12, 13, 14, 16, 48, 49], "embed": [11, 12, 13, 14, 16], "size": [11, 12, 13, 14, 19, 29, 34, 35, 36, 37, 38, 39], "convolut": [11, 12, 13, 14, 16, 21, 49], "kernel": [11, 12, 13, 14, 34, 35, 36], "bool": [11, 12, 13, 14, 16], "whether": [11, 12, 13, 14, 16, 48], "print": [11, 12, 13, 14, 16], "shape": [11, 12, 13, 14, 16, 34, 35, 36, 37, 38, 39, 48, 49], "dure": [11, 13, 48, 49], "skip": [11, 12, 13, 14], "time_embed": [11, 12, 13, 14], "connect": [11, 12, 13, 14], "merg": [11, 13, 49], "option": [11, 13, 15, 16, 48, 51], "encodingblock": 12, "non": [12, 14, 48], "linear": [12, 14, 48], "neural": [12, 14, 48, 49], "network": [12, 14, 16, 48, 49], "tupl": [12, 14, 19], "downscal": [12, 14], "height": [13, 14, 15, 16, 18, 20, 21, 34, 35, 36, 49], "width": [13, 14, 15, 16, 18, 20, 21, 34, 35, 36, 49], "half_channel": 13, "double_height": 13, "double_width": 13, "embedding_s": [13, 14, 16], "double_channel": 14, "half_height": 14, "half_width": 14, "num_head": 15, "dim_feedforward": 15, "implement": [15, 16, 20, 24], "self": [15, 16, 46, 49], "attent": [15, 16, 49], "imag": [15, 19, 20, 34, 35, 36], "data": [15, 48], "desir": 15, "head": [15, 16], "hidden": [15, 16], "feedforward": [15, 16], "default": [15, 16], "us": [15, 16, 21, 48, 49, 50, 51], "uninstanti": 15, "num_encoding_block": 16, "time_emb_s": 16, "init_channel": 16, "64": [16, 19, 49], "true": [16, 48, 49], "architectur": 16, "close": 16, "origin": [16, 48], "paper": 16, "transpos": [16, 21], "upsampl": 16, "same": [16, 48, 49], "pad": 16, "so": [16, 49], "ha": [16, 19, 48], "flexibl": 16, "go": [16, 48, 51], "larger": [16, 48], "depth": 16, "than": [16, 48], "separ": [16, 48], "addit": [16, 27, 49], "from": [16, 48, 49], "possibl": 16, "inject": 16, "condit": [16, 48, 50], "more": [16, 48], "make": [16, 48, 51], "sure": [16, 48], "odd": 16, "still": [16, 48], "even": 16, "bottleneck": [16, 48], "thei": [16, 48, 49], "divis": 16, "num_encod": 16, "yield": 16, "an": [16, 48, 49], "point": [16, 48], "best": 16, "just": [16, 48], "stick": 16, "power": 16, "ronneberger15": 16, "o": 16, "ronneberg": 16, "p": [16, 48], "fischer": 16, "brox": 16, "u": 16, "net": [16, 48], "biomed": 16, "segment": [16, 49], "param": 16, "how": [16, 48], "mani": [16, 48], "basic": [16, 20], "each": [16, 49], "doubl": 16, "half": [16, 48], "resolut": 16, "start": [16, 48, 49, 50], "e": [16, 48, 49], "g": [16, 48, 49], "step": [16, 48, 49], "debbug": 16, "transform": 16, "usual": [16, 19, 48, 49], "128": [16, 19], "hidden_dim": [18, 19, 24], "rtype": [18, 19, 20, 21], "resnet": [19, 20], "For": [19, 20, 48], "exact": 19, "detail": [19, 48], "see": [19, 20, 48], "he": [19, 20], "et": [19, 20, 48], "al": [19, 20, 48], "deep": [19, 20, 49], "residu": [19, 20, 49], "learn": [19, 20, 49], "recognit": [19, 20, 49], "2015": [19, 20, 49], "i": [19, 48, 49, 50, 51], "imagenet": 19, "crop": 19, "224x224": 19, "increas": 19, "decreas": 19, "56x56": 19, "befor": [19, 48], "repeat": [19, 34, 35, 48, 49], "begin": [19, 48], "we": [19, 48, 49, 50], "split": 19, "submodul": 19, "where": [19, 48, 49], "consist": 19, "standard": 19, "halv": 19, "stride": [19, 21], "like": [19, 48], "b": 19, "512": 19, "7x7": 19, "current": 20, "limit": 20, "usag": 20, "resnet18": [20, 21], "resnet34": [20, 21], "visual": 20, "fig": [20, 48], "union": [20, 21], "inspir": 21, "variat": 24, "autoencod": [24, 49], "sigma": [27, 28, 29], "appli": [27, 28, 48, 49], "multipl": 28, "creat": [29, 48, 50, 51], "independ": [29, 48, 49], "mask_typ": [31, 32], "rel_sigma": [31, 34, 35, 36], "undersampling_r": 31, "random_se": 31, "42": 31, "devic": [31, 32, 48], "undersampling_ratio": [32, 37, 38, 39], "liter": [33, 48], "brain": 33, "knee": 33, "1d": [34, 35], "along": [34, 35], "horizont": [34, 37], "std": [34, 35, 36], "dev": [34, 35, 36], "wa": [34, 35, 36, 48], "2d": [34, 35, 36, 37, 38, 39], "last": [34, 35, 36, 37, 38, 39, 48, 49], "dim": [34, 35, 36, 37, 38, 39, 49], "vertic": [35, 38], "regular": [37, 38, 39], "subsampl": [37, 38, 39], "line": [37, 38], "given": [37, 38, 39, 48], "undersampl": [37, 38, 39, 49], "ratio": [37, 38, 39], "integ": [37, 38, 39], "repres": [37, 38, 39, 48], "acceler": [37, 38, 39, 50], "mask": [40, 49], "byte": 43, "dict": 44, "dot": 44, "notat": [44, 48], "access": 44, "dictionari": 44, "object": [46, 48], "__call__": 46, "give": 48, "concis": 48, "overview": 48, "you": [48, 50, 51], "have": [48, 49], "done": 48, "reader": 48, "shall": 48, "abl": 48, "decid": 48, "which": 48, "been": 48, "interest": 48, "him": 48, "read": 48, "provid": 48, "brief": 48, "account": 48, "follow": 48, "question": 48, "what": [48, 49], "problem": 48, "did": 48, "tackl": 48, "were": 48, "your": 48, "find": 48, "why": 48, "ar": [48, 49], "signific": 48, "approxim": 48, "cover": 48, "page": 48, "doe": 48, "contain": 48, "citat": 48, "In": [48, 49], "list": 48, "evalu": [48, 49], "tabl": 48, "graph": 48, "etc": 48, "program": 48, "code": 48, "further": 48, "transit": 48, "q": 48, "bm": 48, "_t": 48, "_": 48, "mathcal": 48, "n": 48, "sqrt": 48, "beta_t": 48, "reparameter": 48, "alpha": 48, "beta": [48, 49], "introduc": 48, "alpha_t": 48, "can": [48, 49], "also": [48, 49], "coher": 48, "index": 48, "benefici": 48, "switch": 48, "random": 48, "epsilon_": 48, "label": 48, "eq": 48, "forward_randomvar": 48, "sim": 48, "earlier": 48, "recurs": 48, "insert": 48, "formula": 48, "recal": 48, "sum": 48, "z": 48, "y": 48, "normal": 48, "mu_x": 48, "sigma_i": 48, "mu_i": 48, "again": [48, 49], "accord": 48, "sigma_x": 48, "align": 48, "x_t": 48, "left": [48, 49], "alpha_": 48, "epsilon": 48, "right": 48, "bar": 48, "end": 48, "term": 48, "cours": 48, "simplifi": 48, "exactli": 48, "therefor": 48, "final": 48, "prod_": 48, "": 48, "evid": 48, "often": 48, "section": 48, "fuse": 48, "interpret": 48, "raw": 48, "latex": 48, "cite": 48, "day2006wap": 48, "do": [48, 49], "here": 48, "recapitul": 48, "describ": 48, "principl": 48, "relationship": 48, "shown": 48, "mention": 48, "inconsist": 48, "except": 48, "found": 48, "other": 48, "show": 48, "agre": 48, "disagre": 48, "reli": 48, "inform": [48, 49], "present": 48, "implic": 48, "applic": 48, "mai": 48, "might": 48, "act": 48, "pair": 48, "answer": 48, "ask": 48, "wai": 48, "research": [48, 49], "experiment": 48, "setup": 48, "methodologi": 48, "conduct": 48, "clear": 48, "If": [48, 51], "produc": 48, "lot": [48, 49], "includ": 48, "onli": [48, 49, 50], "put": 48, "ho": 48, "had": 48, "solut": 48, "ddpm": [48, 50], "nichol": 48, "investig": 48, "altern": 48, "nois": [48, 49], "autocit": 48, "ho2020denois": 48, "nichol2021improv": 48, "conclud": 48, "import": 48, "ones": 48, "respons": 48, "destruct": 48, "squar": 48, "cosin": 48, "would": [48, 51], "smooth": 48, "toward": 48, "critic": 48, "behav": 48, "approach": 48, "It": [48, 50], "immedi": 48, "visibl": 48, "reach": 48, "too": 48, "earli": 48, "flatten": 48, "lead": 48, "intuit": [48, 49], "few": [48, 49], "veri": 48, "intut": 48, "confirm": 48, "measur": 48, "isotrop": 48, "when": 48, "sampl": [48, 49], "through": [48, 49], "50": 48, "differ": 48, "covari": 48, "matrix": 48, "As": 48, "metric": 48, "ident": 48, "pure": 48, "d": [48, 49], "subtract": 48, "absolut": 48, "seen": 48, "closest": 48, "alreadi": 48, "after": 48, "around": [48, 49], "600": 48, "small": [48, 49], "700": 48, "wors": 48, "smaller": 48, "capabl": 48, "least": 48, "850": 48, "topic": 48, "rational": 48, "suffici": 48, "narrow": 48, "down": 48, "particular": 48, "allow": [48, 49], "understand": 48, "scope": 48, "abov": 48, "background": 48, "briefli": 48, "help": 48, "pick": 48, "text": [48, 49], "outlin": 48, "structur": [48, 49], "document": 48, "look": [48, 49], "howev": 48, "chapter": 48, "chang": [48, 51], "name": [48, 49], "requir": 48, "tool": 48, "environ": [48, 51], "taken": 48, "place": 48, "softwar": 48, "packag": 48, "system": 48, "algorithm": 48, "concept": 48, "math": 48, "perhap": 48, "kei": 48, "compon": 48, "framework": 48, "develop": [48, 50], "next": 48, "stem": 48, "statist": 48, "theorem": 48, "written": 48, "frac": 48, "implicitli": 48, "assum": 48, "densiti": 48, "over": [48, 49], "continu": 48, "hold": 48, "letter": 48, "space": 48, "unobserv": 48, "train": 48, "new": [48, 49], "wherea": 48, "observ": 48, "order": 48, "four": 48, "distinct": 48, "margin": 48, "likelihood": 48, "encompass": 48, "actual": 48, "prior": [48, 49], "expos": 48, "ani": [48, 49], "posterior": 48, "post": 48, "exampl": 48, "choos": [48, 49], "specif": 48, "One": [48, 49], "most": 48, "straightforward": 48, "goal": 48, "represent": [48, 49], "vae": 48, "kingma2022autoencod": 48, "tri": 48, "recreat": 48, "its": [48, 49], "therebi": 48, "compress": 48, "doi": 48, "org": 48, "1002": 48, "aic": 48, "690370209": 48, "bear": 48, "similar": 48, "reduct": 48, "princip": 48, "analysi": 48, "pca": 48, "publish": 48, "under": [48, 50], "nonlinear": 48, "part": [48, 50], "fact": 48, "rather": 48, "optim": 48, "combin": 48, "parameter": 48, "p_": 48, "theta_z": 48, "map": 48, "theta_": 48, "chosen": 48, "multivari": 48, "theta": 48, "dz": 48, "nn_": 48, "anoth": 48, "intract": 48, "A": 48, "schemat": 48, "8": 48, "stochast": 48, "determinist": 48, "rightarrow": 48, "f_": 48, "hope": 48, "remov": 48, "gradual": 48, "destroi": 48, "iter": 48, "invert": 48, "suggest": 48, "content": 48, "_0": 48, "our": 48, "partial": 48, "noisi": 48, "intermedi": 48, "almost": 48, "larg": 48, "zero": 48, "vector": [48, 49], "onc": [48, 49], "less": 48, "some": 48, "until": 48, "discret": 48, "whole": 48, "express": 48, "markov": 48, "chain": 48, "depict": 48, "gladli": 48, "necessari": 48, "arriv": 48, "procedur": 48, "forward_alpha": 48, "cumul": 48, "product": 48, "forward_alphadash": 48, "depend": 48, "beyond": 48, "simpl": 48, "case": 48, "constant": 48, "opt": 48, "grow": 48, "linearli": 48, "later": 48, "better": [48, 49], "quit": 48, "quickli": 48, "own": 48, "explor": 48, "explain": 48, "view": [48, 49], "adversari": 48, "goodfellow2014gen": 48, "factor": 48, "full": 48, "invers": 48, "sever": [48, 49], "gan": [48, 49], "ma": 48, "th": 48, "mathca": 48, "l": 48, "k_1": 48, "k_2": 48, "estim": 48, "want": 48, "corrupt": 48, "solv": 48, "try": [48, 49], "q_": 48, "match": [48, 49], "differenti": 48, "sens": 48, "successfulli": 48, "arjovsky2017wasserstein": 48, "previous": 48, "field": 48, "purpos": 48, "mind": 48, "relev": 48, "extent": 48, "without": 48, "literatur": 48, "compil": 48, "nich": 48, "lai": 48, "groundwork": 48, "select": 48, "enabl": 48, "my": [48, 49], "subtitl": 48, "master": 48, "eckhart": 48, "immerheis": 48, "depart": 48, "dvisor": 48, "egon": 48, "hasenfratz": 48, "schreier": 48, "upervisor": 48, "prof": 48, "dr": 48, "luc": 48, "van": 48, "gool": 48, "januari": 48, "fastmri": 49, "nyu": 49, "facebook": 49, "mix": 49, "precis": 49, "jake": 49, "tae": 49, "elbo": 49, "lilian": 49, "weng": 49, "supervis": 49, "flow": 49, "wgan": 49, "valentin": 49, "de": 49, "bortoli": 49, "yang": 49, "song": 49, "score": 49, "group": 49, "recurr": 49, "medic": 49, "pancrea": 49, "collect": 49, "scale": 49, "scalabl": 49, "quantiz": 49, "synthesi": 49, "stabl": 49, "2016": 49, "2018": 49, "respect": 49, "With": 49, "100": 49, "could": 49, "batchnorm2d": 49, "track_running_stat": 49, "shift": 49, "thing": [49, 50], "essenti": 49, "took": 49, "now": 49, "seem": 49, "littl": 49, "bit": 49, "counterintuit": 49, "opinion": 49, "global": 49, "per": 49, "pixel": 49, "oper": 49, "singl": 49, "indic": 49, "mini": 49, "don": [49, 51], "affin": 49, "2022": 49, "pretrain": 49, "uncondit": 49, "region": 49, "goe": 49, "backward": 49, "infer": 49, "resampl": 49, "semant": 49, "reconstruct": [49, 50], "complet": 49, "fix": 49, "amount": 49, "revers": 49, "process": 49, "schedul": 49, "propos": 49, "greatli": 49, "improv": 49, "qualiti": 49, "human": 49, "lpip": 49, "2021": 49, "low": 49, "frequenc": 49, "sdedit": 49, "denois": [49, 50], "somehow": 49, "result": 49, "python": 50, "librari": 50, "being": 50, "thesi": 50, "fall": 50, "semest": 50, "2023": 50, "eth": 50, "zurich": 50, "offer": 50, "everyth": 50, "acquisit": 50, "probabilist": 50, "Not": 50, "yet": 50, "re": 50, "intend": 51, "model": 51, "els": 51, "recommend": 51, "git": 51, "clone": 51, "com": 51, "liopeer": 51, "diffusionmodel": 51, "cd": 51, "env": 51, "f": 51, "yml": 51, "liotorch": 51, "pip": 51}, "objects": {"diffusion_models": [[0, 0, 0, "-", "losses"], [4, 0, 0, "-", "models"], [25, 0, 0, "-", "mri_forward"], [41, 0, 0, "-", "utils"]], "diffusion_models.losses": [[1, 0, 0, "-", "kl_divergence"]], "diffusion_models.losses.kl_divergence": [[2, 1, 1, "", "gaussian_kl"], [3, 1, 1, "", "log_gaussian_kl"]], "diffusion_models.models": [[5, 0, 0, "-", "mnist_enc"], [7, 0, 0, "-", "positional_encoding"], [10, 0, 0, "-", "unet"], [17, 0, 0, "-", "vae"]], "diffusion_models.models.mnist_enc": [[6, 2, 1, "", "MNISTEncoder"]], "diffusion_models.models.mnist_enc.MNISTEncoder": [[6, 3, 1, "", "forward"]], "diffusion_models.models.positional_encoding": [[8, 2, 1, "", "PositionalEncoding"], [9, 2, 1, "", "PositionalEncoding2D"]], "diffusion_models.models.positional_encoding.PositionalEncoding": [[8, 3, 1, "", "forward"], [8, 3, 1, "", "get_pos_encoding"]], "diffusion_models.models.positional_encoding.PositionalEncoding2D": [[9, 3, 1, "", "forward"]], "diffusion_models.models.unet": [[11, 2, 1, "", "AttentionDecodingBlock"], [12, 2, 1, "", "AttentionEncodingBlock"], [13, 2, 1, "", "DecodingBlock"], [14, 2, 1, "", "EncodingBlock"], [15, 2, 1, "", "SelfAttention"], [16, 2, 1, "", "UNet"]], "diffusion_models.models.unet.AttentionDecodingBlock": [[11, 3, 1, "", "forward"]], "diffusion_models.models.unet.AttentionEncodingBlock": [[12, 3, 1, "", "forward"]], "diffusion_models.models.unet.DecodingBlock": [[13, 3, 1, "", "forward"]], "diffusion_models.models.unet.EncodingBlock": [[14, 3, 1, "", "forward"]], "diffusion_models.models.unet.SelfAttention": [[15, 3, 1, "", "forward"]], "diffusion_models.models.unet.UNet": [[16, 3, 1, "", "forward"]], "diffusion_models.models.vae": [[18, 2, 1, "", "ResNet18Decoder"], [19, 2, 1, "", "ResNet18Encoder"], [20, 2, 1, "", "ResNetBlock"], [21, 2, 1, "", "ResNetDecoderBlock"], [22, 2, 1, "", "SkipDownSampler"], [23, 2, 1, "", "SkipUpSampler"], [24, 2, 1, "", "VariationalAutoencoder"]], "diffusion_models.models.vae.ResNet18Decoder": [[18, 3, 1, "", "forward"]], "diffusion_models.models.vae.ResNet18Encoder": [[19, 3, 1, "", "forward"]], "diffusion_models.models.vae.ResNetBlock": [[20, 3, 1, "", "forward"]], "diffusion_models.models.vae.ResNetDecoderBlock": [[21, 3, 1, "", "forward"]], "diffusion_models.models.vae.SkipDownSampler": [[22, 3, 1, "", "forward"]], "diffusion_models.models.vae.SkipUpSampler": [[23, 3, 1, "", "forward"]], "diffusion_models.models.vae.VariationalAutoencoder": [[24, 3, 1, "", "forward"]], "diffusion_models.mri_forward": [[26, 0, 0, "-", "noise"], [30, 0, 0, "-", "undersampling_mask"]], "diffusion_models.mri_forward.noise": [[27, 1, 1, "", "apply_add_gauss_noise"], [28, 1, 1, "", "apply_mult_gauss_noise"], [29, 1, 1, "", "independent_gauss_noise"]], "diffusion_models.mri_forward.undersampling_mask": [[31, 2, 1, "", "StochasticUndersamplingMask"], [32, 2, 1, "", "UndersamplingMask"], [33, 1, 1, "", "apply_fMRI_uSampleMask"], [34, 1, 1, "", "gaussian_kernel1d_h"], [35, 1, 1, "", "gaussian_kernel1d_v"], [36, 1, 1, "", "gaussian_kernel2d"], [37, 1, 1, "", "naive_undersampling1d_h"], [38, 1, 1, "", "naive_undersampling1d_v"], [39, 1, 1, "", "naive_undersampling2d"], [40, 1, 1, "", "normalize_mask"]], "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask": [[31, 3, 1, "", "forward"]], "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask": [[32, 3, 1, "", "forward"]], "diffusion_models.utils": [[42, 0, 0, "-", "helpers"], [45, 0, 0, "-", "mp_setup"]], "diffusion_models.utils.helpers": [[43, 1, 1, "", "bytes_to_gb"], [44, 2, 1, "", "dotdict"]], "diffusion_models.utils.mp_setup": [[46, 2, 1, "", "DDP_Proc_Group"]], "diffusion_models.utils.mp_setup.DDP_Proc_Group": [[46, 3, 1, "", "__call__"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"diffusion_model": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], "loss": [0, 1, 2, 3, 48], "kl_diverg": [1, 2, 3], "gaussian_kl": 2, "log_gaussian_kl": 3, "model": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 48, 49, 50], "mnist_enc": [5, 6], "mnistencod": 6, "positional_encod": [7, 8, 9], "positionalencod": 8, "positionalencoding2d": 9, "unet": [10, 11, 12, 13, 14, 15, 16], "attentiondecodingblock": 11, "attentionencodingblock": 12, "decodingblock": 13, "encodingblock": 14, "selfattent": 15, "thing": 16, "ar": 16, "differ": 16, "kernel": 16, "size": [16, 48], "imag": [16, 48, 49], "vae": [17, 18, 19, 20, 21, 22, 23, 24, 49], "resnet18decod": 18, "resnet18encod": 19, "implement": 19, "resnetblock": 20, "resnetdecoderblock": 21, "skipdownsampl": 22, "skipupsampl": 23, "variationalautoencod": 24, "mri_forward": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], "nois": [26, 27, 28, 29], "apply_add_gauss_nois": 27, "apply_mult_gauss_nois": 28, "independent_gauss_nois": 29, "undersampling_mask": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], "stochasticundersamplingmask": 31, "undersamplingmask": 32, "apply_fmri_usamplemask": 33, "gaussian_kernel1d_h": 34, "gaussian_kernel1d_v": 35, "gaussian_kernel2d": 36, "naive_undersampling1d_h": 37, "naive_undersampling1d_v": 38, "naive_undersampling2d": 39, "normalize_mask": 40, "util": [41, 42, 43, 44, 45, 46], "helper": [42, 43, 44], "bytes_to_gb": 43, "dotdict": 44, "mp_setup": [45, 46], "ddp_proc_group": 46, "api": 47, "abstract": 48, "acknowledg": 48, "The": 48, "first": 48, "appendix": 48, "extend": 48, "deriv": 48, "forward": 48, "process": 48, "close": 48, "form": 48, "conclus": 48, "discuss": 48, "experi": 48, "result": 48, "influenc": 48, "schedul": 48, "diffus": [48, 49, 50], "introduct": 48, "focu": 48, "thi": 48, "work": 48, "thesi": 48, "organ": 48, "materi": 48, "method": 48, "gener": [48, 49, 51], "machin": 48, "learn": 48, "bayesian": [48, 49], "formul": 48, "latent": 48, "variabl": 48, "variat": 48, "autoencod": 48, "denois": 48, "probabilist": 48, "mathemat": 48, "descript": 48, "function": 48, "revers": 48, "compar": 48, "kullback": 48, "leibler": 48, "diverg": 48, "wasserstein": 48, "distanc": 48, "lower": 48, "bound": 48, "relat": 48, "idea": 49, "corner": 49, "public": 49, "dataset": 49, "train": 49, "strategi": 49, "perspect": 49, "ai": 49, "normal": 49, "paper": 49, "u": 49, "net": 49, "variant": 49, "transform": 49, "rel": 49, "posit": 49, "encod": 49, "sophist": 49, "ddpm": 49, "batchnorm": 49, "v": 49, "layernorm": 49, "instancenorm": 49, "groupnorm": 49, "inpaint": 49, "repaint": 49, "condit": 49, "ilvr": 49, "sedit": 49, "mri": 50, "instal": 51, "usag": 51, "conda": 51, "docker": 51, "develop": 51}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"diffusion_models.losses": [[0, "module-diffusion_models.losses"]], "diffusion_models.losses.kl_divergence": [[1, "module-diffusion_models.losses.kl_divergence"]], "diffusion_models.losses.kl_divergence.gaussian_kl": [[2, "diffusion-models-losses-kl-divergence-gaussian-kl"]], "diffusion_models.losses.kl_divergence.log_gaussian_kl": [[3, "diffusion-models-losses-kl-divergence-log-gaussian-kl"]], "diffusion_models.models": [[4, "module-diffusion_models.models"]], "diffusion_models.models.mnist_enc": [[5, "module-diffusion_models.models.mnist_enc"]], "diffusion_models.models.mnist_enc.MNISTEncoder": [[6, "diffusion-models-models-mnist-enc-mnistencoder"]], "diffusion_models.models.positional_encoding": [[7, "module-diffusion_models.models.positional_encoding"]], "diffusion_models.models.positional_encoding.PositionalEncoding": [[8, "diffusion-models-models-positional-encoding-positionalencoding"]], "diffusion_models.models.positional_encoding.PositionalEncoding2D": [[9, "diffusion-models-models-positional-encoding-positionalencoding2d"]], "diffusion_models.models.unet": [[10, "module-diffusion_models.models.unet"]], "diffusion_models.models.unet.AttentionDecodingBlock": [[11, "diffusion-models-models-unet-attentiondecodingblock"]], "diffusion_models.models.unet.AttentionEncodingBlock": [[12, "diffusion-models-models-unet-attentionencodingblock"]], "diffusion_models.models.unet.DecodingBlock": [[13, "diffusion-models-models-unet-decodingblock"]], "diffusion_models.models.unet.EncodingBlock": [[14, "diffusion-models-models-unet-encodingblock"]], "diffusion_models.models.unet.SelfAttention": [[15, "diffusion-models-models-unet-selfattention"]], "diffusion_models.models.unet.UNet": [[16, "diffusion-models-models-unet-unet"]], "Things that are different": [[16, "things-that-are-different"]], "Kernel sizes": [[16, "kernel-sizes"]], "Images sizes": [[16, "images-sizes"]], "diffusion_models.models.vae": [[17, "module-diffusion_models.models.vae"]], "diffusion_models.models.vae.ResNet18Decoder": [[18, "diffusion-models-models-vae-resnet18decoder"]], "diffusion_models.models.vae.ResNet18Encoder": [[19, "diffusion-models-models-vae-resnet18encoder"]], "Implementation": [[19, "implementation"]], "diffusion_models.models.vae.ResNetBlock": [[20, "diffusion-models-models-vae-resnetblock"]], "diffusion_models.models.vae.ResNetDecoderBlock": [[21, "diffusion-models-models-vae-resnetdecoderblock"]], "diffusion_models.models.vae.SkipDownSampler": [[22, "diffusion-models-models-vae-skipdownsampler"]], "diffusion_models.models.vae.SkipUpSampler": [[23, "diffusion-models-models-vae-skipupsampler"]], "diffusion_models.models.vae.VariationalAutoencoder": [[24, "diffusion-models-models-vae-variationalautoencoder"]], "diffusion_models.mri_forward": [[25, "module-diffusion_models.mri_forward"]], "diffusion_models.mri_forward.noise": [[26, "module-diffusion_models.mri_forward.noise"]], "diffusion_models.mri_forward.noise.apply_add_gauss_noise": [[27, "diffusion-models-mri-forward-noise-apply-add-gauss-noise"]], "diffusion_models.mri_forward.noise.apply_mult_gauss_noise": [[28, "diffusion-models-mri-forward-noise-apply-mult-gauss-noise"]], "diffusion_models.mri_forward.noise.independent_gauss_noise": [[29, "diffusion-models-mri-forward-noise-independent-gauss-noise"]], "diffusion_models.mri_forward.undersampling_mask": [[30, "module-diffusion_models.mri_forward.undersampling_mask"]], "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask": [[31, "diffusion-models-mri-forward-undersampling-mask-stochasticundersamplingmask"]], "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask": [[32, "diffusion-models-mri-forward-undersampling-mask-undersamplingmask"]], "diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask": [[33, "diffusion-models-mri-forward-undersampling-mask-apply-fmri-usamplemask"]], "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h": [[34, "diffusion-models-mri-forward-undersampling-mask-gaussian-kernel1d-h"]], "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v": [[35, "diffusion-models-mri-forward-undersampling-mask-gaussian-kernel1d-v"]], "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d": [[36, "diffusion-models-mri-forward-undersampling-mask-gaussian-kernel2d"]], "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h": [[37, "diffusion-models-mri-forward-undersampling-mask-naive-undersampling1d-h"]], "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v": [[38, "diffusion-models-mri-forward-undersampling-mask-naive-undersampling1d-v"]], "diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d": [[39, "diffusion-models-mri-forward-undersampling-mask-naive-undersampling2d"]], "diffusion_models.mri_forward.undersampling_mask.normalize_mask": [[40, "diffusion-models-mri-forward-undersampling-mask-normalize-mask"]], "diffusion_models.utils": [[41, "module-diffusion_models.utils"]], "diffusion_models.utils.helpers": [[42, "module-diffusion_models.utils.helpers"]], "diffusion_models.utils.helpers.bytes_to_gb": [[43, "diffusion-models-utils-helpers-bytes-to-gb"]], "diffusion_models.utils.helpers.dotdict": [[44, "diffusion-models-utils-helpers-dotdict"]], "diffusion_models.utils.mp_setup": [[45, "module-diffusion_models.utils.mp_setup"]], "diffusion_models.utils.mp_setup.DDP_Proc_Group": [[46, "diffusion-models-utils-mp-setup-ddp-proc-group"]], "API": [[47, "api"]], "Abstract": [[48, "abstract"]], "Acknowledgements": [[48, "acknowledgements"]], "The First Appendix": [[48, "the-first-appendix"]], "Extended Derivations": [[48, "extended-derivations"]], "Forward Process Closed-Form": [[48, "forward-process-closed-form"]], "Conclusion": [[48, "conclusion"]], "Discussion": [[48, "discussion"]], "Experiments and Results": [[48, "experiments-and-results"]], "Influence of Schedules and Image Size on the Forward Diffusion": [[48, "influence-of-schedules-and-image-size-on-the-forward-diffusion"]], "Introduction": [[48, "introduction"]], "Focus of this Work": [[48, "focus-of-this-work"]], "Thesis Organization": [[48, "thesis-organization"]], "Materials and Methods": [[48, "materials-and-methods"]], "Generative Machine Learning": [[48, "generative-machine-learning"]], "Bayesian Formulation of Latent Variable Models": [[48, "bayesian-formulation-of-latent-variable-models"]], "Variational Autoencoders": [[48, "variational-autoencoders"]], "Diffusion Denoising Probabilistic Models": [[48, "diffusion-denoising-probabilistic-models"]], "Forward Diffusion Process": [[48, "forward-diffusion-process"]], "Mathematical Description": [[48, "mathematical-description"]], "Influence of Scheduling Functions": [[48, "influence-of-scheduling-functions"]], "Reverse Diffusion Process": [[48, "reverse-diffusion-process"]], "Latent Variable Models Compared": [[48, "latent-variable-models-compared"]], "Loss Functions": [[48, "loss-functions"]], "Kullback-Leibler Divergence": [[48, "kullback-leibler-divergence"]], "Wasserstein Distance": [[48, "wasserstein-distance"]], "Variational Lower Bound": [[48, "variational-lower-bound"]], "Related Work": [[48, "related-work"]], "Idea Corner": [[49, "idea-corner"]], "Public Datasets": [[49, "public-datasets"]], "Training Strategies": [[49, "training-strategies"]], "Bayesian Perspective on Generative AI": [[49, "bayesian-perspective-on-generative-ai"]], "Normalization Papers": [[49, "normalization-papers"]], "U-Net Variants": [[49, "u-net-variants"]], "Diffusion Models with Transformers": [[49, "diffusion-models-with-transformers"]], "Relative Positional Encodings": [[49, "relative-positional-encodings"]], "Sophisticated VAE/DDPMs": [[49, "sophisticated-vae-ddpms"]], "BatchNorm vs. LayerNorm vs. InstanceNorm vs. GroupNorm": [[49, "batchnorm-vs-layernorm-vs-instancenorm-vs-groupnorm"]], "BatchNorm": [[49, "batchnorm"]], "LayerNorm": [[49, "layernorm"]], "InstanceNorm": [[49, "instancenorm"]], "GroupNorm": [[49, "groupnorm"]], "": [[49, "id1"]], "Image Inpainting": [[49, "image-inpainting"]], "RePaint": [[49, "repaint"]], "Image-Conditioned Diffusion Models": [[49, "image-conditioned-diffusion-models"]], "ILVR": [[49, "ilvr"]], "SEdit": [[49, "sedit"]], "Diffusion Models for MRI": [[50, "diffusion-models-for-mri"]], "Installation": [[51, "installation"]], "General Usage": [[51, "general-usage"]], "Conda": [[51, "conda"], [51, "id3"]], "Docker": [[51, "docker"], [51, "id4"]], "Development": [[51, "development"]]}, "indexentries": {"diffusion_models.losses": [[0, "module-diffusion_models.losses"]], "module": [[0, "module-diffusion_models.losses"], [1, "module-diffusion_models.losses.kl_divergence"], [4, "module-diffusion_models.models"], [5, "module-diffusion_models.models.mnist_enc"], [7, "module-diffusion_models.models.positional_encoding"], [10, "module-diffusion_models.models.unet"], [17, "module-diffusion_models.models.vae"], [25, "module-diffusion_models.mri_forward"], [26, "module-diffusion_models.mri_forward.noise"], [30, "module-diffusion_models.mri_forward.undersampling_mask"], [41, "module-diffusion_models.utils"], [42, "module-diffusion_models.utils.helpers"], [45, "module-diffusion_models.utils.mp_setup"]], "diffusion_models.losses.kl_divergence": [[1, "module-diffusion_models.losses.kl_divergence"]], "gaussian_kl() (in module diffusion_models.losses.kl_divergence)": [[2, "diffusion_models.losses.kl_divergence.gaussian_kl"]], "log_gaussian_kl() (in module diffusion_models.losses.kl_divergence)": [[3, "diffusion_models.losses.kl_divergence.log_gaussian_kl"]], "diffusion_models.models": [[4, "module-diffusion_models.models"]], "diffusion_models.models.mnist_enc": [[5, "module-diffusion_models.models.mnist_enc"]], "mnistencoder (class in diffusion_models.models.mnist_enc)": [[6, "diffusion_models.models.mnist_enc.MNISTEncoder"]], "forward() (diffusion_models.models.mnist_enc.mnistencoder method)": [[6, "diffusion_models.models.mnist_enc.MNISTEncoder.forward"]], "diffusion_models.models.positional_encoding": [[7, "module-diffusion_models.models.positional_encoding"]], "positionalencoding (class in diffusion_models.models.positional_encoding)": [[8, "diffusion_models.models.positional_encoding.PositionalEncoding"]], "forward() (diffusion_models.models.positional_encoding.positionalencoding method)": [[8, "diffusion_models.models.positional_encoding.PositionalEncoding.forward"]], "get_pos_encoding() (diffusion_models.models.positional_encoding.positionalencoding method)": [[8, "diffusion_models.models.positional_encoding.PositionalEncoding.get_pos_encoding"]], "positionalencoding2d (class in diffusion_models.models.positional_encoding)": [[9, "diffusion_models.models.positional_encoding.PositionalEncoding2D"]], "forward() (diffusion_models.models.positional_encoding.positionalencoding2d method)": [[9, "diffusion_models.models.positional_encoding.PositionalEncoding2D.forward"]], "diffusion_models.models.unet": [[10, "module-diffusion_models.models.unet"]], "attentiondecodingblock (class in diffusion_models.models.unet)": [[11, "diffusion_models.models.unet.AttentionDecodingBlock"]], "forward() (diffusion_models.models.unet.attentiondecodingblock method)": [[11, "diffusion_models.models.unet.AttentionDecodingBlock.forward"]], "attentionencodingblock (class in diffusion_models.models.unet)": [[12, "diffusion_models.models.unet.AttentionEncodingBlock"]], "forward() (diffusion_models.models.unet.attentionencodingblock method)": [[12, "diffusion_models.models.unet.AttentionEncodingBlock.forward"]], "decodingblock (class in diffusion_models.models.unet)": [[13, "diffusion_models.models.unet.DecodingBlock"]], "forward() (diffusion_models.models.unet.decodingblock method)": [[13, "diffusion_models.models.unet.DecodingBlock.forward"]], "encodingblock (class in diffusion_models.models.unet)": [[14, "diffusion_models.models.unet.EncodingBlock"]], "forward() (diffusion_models.models.unet.encodingblock method)": [[14, "diffusion_models.models.unet.EncodingBlock.forward"]], "selfattention (class in diffusion_models.models.unet)": [[15, "diffusion_models.models.unet.SelfAttention"]], "forward() (diffusion_models.models.unet.selfattention method)": [[15, "diffusion_models.models.unet.SelfAttention.forward"]], "unet (class in diffusion_models.models.unet)": [[16, "diffusion_models.models.unet.UNet"]], "forward() (diffusion_models.models.unet.unet method)": [[16, "diffusion_models.models.unet.UNet.forward"]], "diffusion_models.models.vae": [[17, "module-diffusion_models.models.vae"]], "resnet18decoder (class in diffusion_models.models.vae)": [[18, "diffusion_models.models.vae.ResNet18Decoder"]], "forward() (diffusion_models.models.vae.resnet18decoder method)": [[18, "diffusion_models.models.vae.ResNet18Decoder.forward"]], "resnet18encoder (class in diffusion_models.models.vae)": [[19, "diffusion_models.models.vae.ResNet18Encoder"]], "forward() (diffusion_models.models.vae.resnet18encoder method)": [[19, "diffusion_models.models.vae.ResNet18Encoder.forward"]], "resnetblock (class in diffusion_models.models.vae)": [[20, "diffusion_models.models.vae.ResNetBlock"]], "forward() (diffusion_models.models.vae.resnetblock method)": [[20, "diffusion_models.models.vae.ResNetBlock.forward"]], "resnetdecoderblock (class in diffusion_models.models.vae)": [[21, "diffusion_models.models.vae.ResNetDecoderBlock"]], "forward() (diffusion_models.models.vae.resnetdecoderblock method)": [[21, "diffusion_models.models.vae.ResNetDecoderBlock.forward"]], "skipdownsampler (class in diffusion_models.models.vae)": [[22, "diffusion_models.models.vae.SkipDownSampler"]], "forward() (diffusion_models.models.vae.skipdownsampler method)": [[22, "diffusion_models.models.vae.SkipDownSampler.forward"]], "skipupsampler (class in diffusion_models.models.vae)": [[23, "diffusion_models.models.vae.SkipUpSampler"]], "forward() (diffusion_models.models.vae.skipupsampler method)": [[23, "diffusion_models.models.vae.SkipUpSampler.forward"]], "variationalautoencoder (class in diffusion_models.models.vae)": [[24, "diffusion_models.models.vae.VariationalAutoencoder"]], "forward() (diffusion_models.models.vae.variationalautoencoder method)": [[24, "diffusion_models.models.vae.VariationalAutoencoder.forward"]], "diffusion_models.mri_forward": [[25, "module-diffusion_models.mri_forward"]], "diffusion_models.mri_forward.noise": [[26, "module-diffusion_models.mri_forward.noise"]], "apply_add_gauss_noise() (in module diffusion_models.mri_forward.noise)": [[27, "diffusion_models.mri_forward.noise.apply_add_gauss_noise"]], "apply_mult_gauss_noise() (in module diffusion_models.mri_forward.noise)": [[28, "diffusion_models.mri_forward.noise.apply_mult_gauss_noise"]], "independent_gauss_noise() (in module diffusion_models.mri_forward.noise)": [[29, "diffusion_models.mri_forward.noise.independent_gauss_noise"]], "diffusion_models.mri_forward.undersampling_mask": [[30, "module-diffusion_models.mri_forward.undersampling_mask"]], "stochasticundersamplingmask (class in diffusion_models.mri_forward.undersampling_mask)": [[31, "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask"]], "forward() (diffusion_models.mri_forward.undersampling_mask.stochasticundersamplingmask method)": [[31, "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask.forward"]], "undersamplingmask (class in diffusion_models.mri_forward.undersampling_mask)": [[32, "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask"]], "forward() (diffusion_models.mri_forward.undersampling_mask.undersamplingmask method)": [[32, "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask.forward"]], "apply_fmri_usamplemask() (in module diffusion_models.mri_forward.undersampling_mask)": [[33, "diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask"]], "gaussian_kernel1d_h() (in module diffusion_models.mri_forward.undersampling_mask)": [[34, "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h"]], "gaussian_kernel1d_v() (in module diffusion_models.mri_forward.undersampling_mask)": [[35, "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v"]], "gaussian_kernel2d() (in module diffusion_models.mri_forward.undersampling_mask)": [[36, "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d"]], "naive_undersampling1d_h() (in module diffusion_models.mri_forward.undersampling_mask)": [[37, "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h"]], "naive_undersampling1d_v() (in module diffusion_models.mri_forward.undersampling_mask)": [[38, "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v"]], "naive_undersampling2d() (in module diffusion_models.mri_forward.undersampling_mask)": [[39, "diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d"]], "normalize_mask() (in module diffusion_models.mri_forward.undersampling_mask)": [[40, "diffusion_models.mri_forward.undersampling_mask.normalize_mask"]], "diffusion_models.utils": [[41, "module-diffusion_models.utils"]], "diffusion_models.utils.helpers": [[42, "module-diffusion_models.utils.helpers"]], "bytes_to_gb() (in module diffusion_models.utils.helpers)": [[43, "diffusion_models.utils.helpers.bytes_to_gb"]], "dotdict (class in diffusion_models.utils.helpers)": [[44, "diffusion_models.utils.helpers.dotdict"]], "diffusion_models.utils.mp_setup": [[45, "module-diffusion_models.utils.mp_setup"]], "ddp_proc_group (class in diffusion_models.utils.mp_setup)": [[46, "diffusion_models.utils.mp_setup.DDP_Proc_Group"]], "__call__() (diffusion_models.utils.mp_setup.ddp_proc_group method)": [[46, "diffusion_models.utils.mp_setup.DDP_Proc_Group.__call__"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["_autosummary/diffusion_models.losses", "_autosummary/diffusion_models.losses.kl_divergence", "_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl", "_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl", "_autosummary/diffusion_models.models", "_autosummary/diffusion_models.models.mnist_enc", "_autosummary/diffusion_models.models.mnist_enc.MNISTEncoder", "_autosummary/diffusion_models.models.multicoil", "_autosummary/diffusion_models.models.multicoil.MultiCoilConv2d", "_autosummary/diffusion_models.models.multicoil.MultiCoilReducer", "_autosummary/diffusion_models.models.positional_encoding", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D", "_autosummary/diffusion_models.models.unet", "_autosummary/diffusion_models.models.unet.AttentionDecodingBlock", "_autosummary/diffusion_models.models.unet.AttentionEncodingBlock", "_autosummary/diffusion_models.models.unet.DecodingBlock", "_autosummary/diffusion_models.models.unet.EncodingBlock", "_autosummary/diffusion_models.models.unet.SelfAttention", "_autosummary/diffusion_models.models.unet.UNet", "_autosummary/diffusion_models.models.vae", "_autosummary/diffusion_models.models.vae.ResNet18Decoder", "_autosummary/diffusion_models.models.vae.ResNet18Encoder", "_autosummary/diffusion_models.models.vae.ResNetBlock", "_autosummary/diffusion_models.models.vae.ResNetDecoderBlock", "_autosummary/diffusion_models.models.vae.SkipDownSampler", "_autosummary/diffusion_models.models.vae.SkipUpSampler", "_autosummary/diffusion_models.models.vae.VariationalAutoencoder", "_autosummary/diffusion_models.mri_forward", "_autosummary/diffusion_models.mri_forward.noise", "_autosummary/diffusion_models.mri_forward.noise.apply_add_gauss_noise", "_autosummary/diffusion_models.mri_forward.noise.apply_mult_gauss_noise", "_autosummary/diffusion_models.mri_forward.noise.independent_gauss_noise", "_autosummary/diffusion_models.mri_forward.undersampling_mask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.UndersamplingMask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d", "_autosummary/diffusion_models.mri_forward.undersampling_mask.normalize_mask", "_autosummary/diffusion_models.utils", "_autosummary/diffusion_models.utils.helpers", "_autosummary/diffusion_models.utils.helpers.bytes_to_gb", "_autosummary/diffusion_models.utils.helpers.complex_to_2channelfloat", "_autosummary/diffusion_models.utils.helpers.dotdict", "_autosummary/diffusion_models.utils.mp_setup", "_autosummary/diffusion_models.utils.mp_setup.DDP_Proc_Group", "api", "chap/tex_stuff", "idea_corner", "index", "installation"], "filenames": ["_autosummary/diffusion_models.losses.rst", "_autosummary/diffusion_models.losses.kl_divergence.rst", "_autosummary/diffusion_models.losses.kl_divergence.gaussian_kl.rst", "_autosummary/diffusion_models.losses.kl_divergence.log_gaussian_kl.rst", "_autosummary/diffusion_models.models.rst", "_autosummary/diffusion_models.models.mnist_enc.rst", "_autosummary/diffusion_models.models.mnist_enc.MNISTEncoder.rst", "_autosummary/diffusion_models.models.multicoil.rst", "_autosummary/diffusion_models.models.multicoil.MultiCoilConv2d.rst", "_autosummary/diffusion_models.models.multicoil.MultiCoilReducer.rst", "_autosummary/diffusion_models.models.positional_encoding.rst", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding.rst", "_autosummary/diffusion_models.models.positional_encoding.PositionalEncoding2D.rst", "_autosummary/diffusion_models.models.unet.rst", "_autosummary/diffusion_models.models.unet.AttentionDecodingBlock.rst", "_autosummary/diffusion_models.models.unet.AttentionEncodingBlock.rst", "_autosummary/diffusion_models.models.unet.DecodingBlock.rst", "_autosummary/diffusion_models.models.unet.EncodingBlock.rst", "_autosummary/diffusion_models.models.unet.SelfAttention.rst", "_autosummary/diffusion_models.models.unet.UNet.rst", "_autosummary/diffusion_models.models.vae.rst", "_autosummary/diffusion_models.models.vae.ResNet18Decoder.rst", "_autosummary/diffusion_models.models.vae.ResNet18Encoder.rst", "_autosummary/diffusion_models.models.vae.ResNetBlock.rst", "_autosummary/diffusion_models.models.vae.ResNetDecoderBlock.rst", "_autosummary/diffusion_models.models.vae.SkipDownSampler.rst", "_autosummary/diffusion_models.models.vae.SkipUpSampler.rst", "_autosummary/diffusion_models.models.vae.VariationalAutoencoder.rst", "_autosummary/diffusion_models.mri_forward.rst", "_autosummary/diffusion_models.mri_forward.noise.rst", "_autosummary/diffusion_models.mri_forward.noise.apply_add_gauss_noise.rst", "_autosummary/diffusion_models.mri_forward.noise.apply_mult_gauss_noise.rst", "_autosummary/diffusion_models.mri_forward.noise.independent_gauss_noise.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.UndersamplingMask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d.rst", "_autosummary/diffusion_models.mri_forward.undersampling_mask.normalize_mask.rst", "_autosummary/diffusion_models.utils.rst", "_autosummary/diffusion_models.utils.helpers.rst", "_autosummary/diffusion_models.utils.helpers.bytes_to_gb.rst", "_autosummary/diffusion_models.utils.helpers.complex_to_2channelfloat.rst", "_autosummary/diffusion_models.utils.helpers.dotdict.rst", "_autosummary/diffusion_models.utils.mp_setup.rst", "_autosummary/diffusion_models.utils.mp_setup.DDP_Proc_Group.rst", "api.rst", "chap/tex_stuff.rst", "idea_corner.md", "index.rst", "installation.md"], "titles": ["diffusion_models.losses", "diffusion_models.losses.kl_divergence", "diffusion_models.losses.kl_divergence.gaussian_kl", "diffusion_models.losses.kl_divergence.log_gaussian_kl", "diffusion_models.models", "diffusion_models.models.mnist_enc", "diffusion_models.models.mnist_enc.MNISTEncoder", "diffusion_models.models.multicoil", "diffusion_models.models.multicoil.MultiCoilConv2d", "diffusion_models.models.multicoil.MultiCoilReducer", "diffusion_models.models.positional_encoding", "diffusion_models.models.positional_encoding.PositionalEncoding", "diffusion_models.models.positional_encoding.PositionalEncoding2D", "diffusion_models.models.unet", "diffusion_models.models.unet.AttentionDecodingBlock", "diffusion_models.models.unet.AttentionEncodingBlock", "diffusion_models.models.unet.DecodingBlock", "diffusion_models.models.unet.EncodingBlock", "diffusion_models.models.unet.SelfAttention", "diffusion_models.models.unet.UNet", "diffusion_models.models.vae", "diffusion_models.models.vae.ResNet18Decoder", "diffusion_models.models.vae.ResNet18Encoder", "diffusion_models.models.vae.ResNetBlock", "diffusion_models.models.vae.ResNetDecoderBlock", "diffusion_models.models.vae.SkipDownSampler", "diffusion_models.models.vae.SkipUpSampler", "diffusion_models.models.vae.VariationalAutoencoder", "diffusion_models.mri_forward", "diffusion_models.mri_forward.noise", "diffusion_models.mri_forward.noise.apply_add_gauss_noise", "diffusion_models.mri_forward.noise.apply_mult_gauss_noise", "diffusion_models.mri_forward.noise.independent_gauss_noise", "diffusion_models.mri_forward.undersampling_mask", "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask", "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask", "diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask", "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h", "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v", "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d", "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h", "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v", "diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d", "diffusion_models.mri_forward.undersampling_mask.normalize_mask", "diffusion_models.utils", "diffusion_models.utils.helpers", "diffusion_models.utils.helpers.bytes_to_gb", "diffusion_models.utils.helpers.complex_to_2channelfloat", "diffusion_models.utils.helpers.dotdict", "diffusion_models.utils.mp_setup", "diffusion_models.utils.mp_setup.DDP_Proc_Group", "API", "Abstract", "Idea Corner", "Diffusion Models for MRI", "Installation"], "terms": {"function": [1, 6, 8, 9, 12, 18, 19, 21, 22, 23, 24, 25, 26, 27, 29, 33, 34, 35, 45, 50], "p_mean": [2, 3], "p_var": 2, "q_mean": [2, 3], "q_var": 2, "calcul": [2, 3, 52, 53], "kl": [2, 3, 52], "diverg": [2, 3], "2": [2, 3, 9, 19, 22, 23, 24, 37, 38, 39, 40, 41, 42, 47, 52, 53], "gaussian": [2, 3, 32, 37, 38, 39, 52], "distribut": [2, 3, 52], "between": [2, 3, 52], "two": [2, 3, 52], "univari": [2, 3], "deriv": [2, 3], "1": [2, 3, 9, 11, 19, 37, 38, 39, 52, 53], "k": [2, 3, 9], "dimension": [2, 3, 11], "paramet": [2, 3, 9, 11, 14, 15, 16, 17, 18, 19, 37, 38, 39, 40, 41, 42, 52], "float": [2, 3, 8, 9, 11, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 37, 38, 39, 47], "tensor": [2, 3, 8, 9, 11, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 30, 31, 32, 37, 38, 39, 40, 41, 42, 47], "mean": [2, 3, 19, 52, 53], "valu": [2, 3, 11, 18, 52, 53], "first": [2, 3, 22], "varianc": [2, 3, 52, 53], "second": [2, 3, 22, 52], "return": [2, 3, 11, 14, 15, 16, 17, 18, 19, 37, 38, 39, 40, 41, 42, 47, 50], "input": [2, 3, 9, 11, 14, 15, 16, 17, 18, 19, 52], "type": [2, 3, 11, 14, 15, 16, 17, 18, 19, 36, 37, 38, 39, 40, 41, 42, 47, 50], "out": [2, 3, 11, 18, 19, 52], "refer": [2, 3, 19, 52], "http": [2, 3, 52, 55], "mr": [2, 3], "easi": [2, 3, 52], "github": [2, 3, 55], "io": [2, 3], "2020": [2, 3, 52], "04": [2, 3], "16": [2, 3, 9, 53], "p_logvar": 3, "q_logvar": 3, "log": 3, "class": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 33, 34, 35, 45, 48, 49, 50], "out_class": 6, "10": [6, 52], "kernel_s": [6, 9, 14, 15, 16, 17, 19], "3": [6, 9, 14, 15, 16, 17, 19, 21, 27, 52, 53], "base": [6, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35, 48, 50, 52, 53], "modul": [6, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35], "initi": [6, 8, 9, 12, 14, 15, 16, 17, 19, 21, 22, 25, 26, 27, 34, 35, 53], "intern": [6, 8, 12, 21, 22, 25, 26, 27, 34, 35], "state": [6, 8, 12, 21, 22, 25, 26, 27, 34, 35, 52], "share": [6, 8, 12, 21, 22, 25, 26, 27, 34, 35], "both": [6, 8, 12, 19, 21, 22, 25, 26, 27, 34, 35, 40, 41, 42, 52], "nn": [6, 8, 12, 14, 15, 16, 17, 18, 19, 21, 22, 25, 26, 27, 34, 35, 52], "scriptmodul": [6, 8, 12, 21, 22, 25, 26, 27, 34, 35], "method": [6, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35, 48, 50], "attribut": [6, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35, 48], "forward": [6, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35, 53], "x": [6, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35, 36, 47, 52, 53], "defin": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52], "comput": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "perform": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52], "everi": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52, 53], "call": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 50, 52], "should": [6, 8, 9, 12, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52, 53], "overridden": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "all": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52, 53], "subclass": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "although": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "recip": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "pass": [6, 8, 9, 12, 14, 15, 16, 17, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52, 53], "need": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52], "within": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "thi": [6, 8, 9, 12, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35, 53, 54], "one": [6, 8, 9, 11, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 55], "instanc": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 53], "afterward": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "instead": [6, 8, 9, 12, 19, 21, 22, 23, 24, 25, 26, 27, 34, 35], "sinc": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 52], "former": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "take": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "care": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "run": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "regist": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "hook": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "while": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "latter": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "silent": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "ignor": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35, 53], "them": [6, 8, 9, 12, 21, 22, 23, 24, 25, 26, 27, 34, 35], "arg": [8, 12, 50], "kwarg": [8, 12, 50], "rtype": [8, 9, 21, 22, 23, 24], "batch": [8, 9, 11, 16, 17, 18, 19, 21, 22, 23, 24, 47, 52, 53], "coil": [8, 9], "out_channel": [8, 9, 14, 15, 16, 17, 21, 23, 24, 25, 26], "height": [8, 9, 16, 17, 18, 19, 21, 23, 24, 37, 38, 39, 47, 53], "width": [8, 9, 16, 17, 18, 19, 21, 23, 24, 37, 38, 39, 47, 53], "channel_factor": 9, "4": [9, 14, 15, 19, 22], "8": [9, 52], "32": 9, "constructor": [9, 11, 18, 19, 23, 24], "independ": [9, 32, 52, 53], "treat": 9, "like": [9, 22, 52], "sub": 9, "fraction": 9, "increas": [9, 22], "channel": [9, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 53], "size": [9, 14, 15, 16, 17, 22, 32, 37, 38, 39, 40, 41, 42], "massiv": 9, "from": [9, 19, 52, 53], "complex": 9, "space": [9, 52], "data": [9, 18, 52], "via": 9, "sever": [9, 52, 53], "convolut": [9, 14, 15, 16, 17, 19, 24, 53], "layer": [9, 11, 14, 15, 16, 17, 18, 19, 52, 53], "averag": 9, "those": 9, "over": [9, 52, 53], "dimens": [9, 14, 15, 16, 17, 18, 19, 37, 38, 40, 41, 42, 52, 53], "i": [9, 22, 52, 53, 54, 55], "invari": 9, "permut": 9, "order": [9, 52], "so": [9, 19, 53], "number": [9, 14, 15, 16, 17, 18, 19, 52], "matter": 9, "anymor": 9, "inspir": [9, 24], "wa": [9, 37, 38, 39, 52], "drawn": 9, "point": [9, 19, 52], "cloud": 9, "process": [9, 53], "see": [9, 22, 23, 52], "below": 9, "qi": 9, "et": [9, 22, 23, 52], "al": [9, 22, 23, 52], "pointnet": 9, "deep": [9, 22, 23, 53], "learn": [9, 22, 23, 53], "set": [9, 11, 52, 53, 54], "3d": 9, "classif": 9, "segment": [9, 19, 53], "2017": 9, "list": [9, 52], "int": [9, 11, 14, 15, 16, 17, 18, 19, 40, 41, 42, 52], "sequenc": [9, 11], "includ": [9, 52], "factor": [9, 52], "kernel": [9, 14, 15, 16, 17, 37, 38, 39], "conv": 9, "d_model": 11, "256": [11, 19, 21, 22, 27], "dropout": [11, 14, 15, 16, 17, 18, 19], "0": [11, 14, 15, 16, 17, 19, 52, 53], "max_len": 11, "5000": 11, "featur": [11, 53], "probabl": [11, 14, 15, 16, 17, 18, 19, 52], "maximum": [11, 52], "length": 11, "shorter": 11, "free": 11, "up": [11, 52, 54], "gpu": 11, "memori": 11, "output": [11, 14, 15, 16, 17, 18, 19, 22, 52], "ad": [11, 52], "posit": [11, 19], "encod": [11, 15, 17, 19, 22, 52], "get_pos_encod": 11, "t": [11, 19, 52, 53, 55], "get": [11, 52, 53, 54], "timestep": [11, 52], "int64": 11, "in_channel": [14, 15, 16, 17, 19, 22, 23, 24, 25, 26, 27], "time_embedding_s": [14, 15, 16, 17], "5": [14, 15, 16, 17, 19, 52], "activ": [14, 15, 16, 17, 18, 19, 55], "torch": [14, 15, 16, 17, 18, 19, 53], "silu": [14, 15, 16, 17, 18, 19], "verbos": [14, 15, 16, 17, 19], "fals": [14, 15, 16, 17, 19, 53], "attention_head": [14, 15, 19], "attention_ff_dim": [14, 15, 19], "none": [14, 15, 16, 18, 19, 34, 35, 50], "decodingblock": 14, "decod": [14, 16], "build": [14, 15, 16, 17, 19, 23], "block": [14, 15, 16, 17, 19, 22, 23], "time": [14, 15, 16, 17, 19, 52, 53], "embed": [14, 15, 16, 17, 19], "bool": [14, 15, 16, 17, 19], "whether": [14, 15, 16, 17, 19, 52], "print": [14, 15, 16, 17, 19], "shape": [14, 15, 16, 17, 19, 37, 38, 39, 40, 41, 42, 52, 53], "dure": [14, 16, 52, 53], "skip": [14, 15, 16, 17], "time_embed": [14, 15, 16, 17], "connect": [14, 15, 16, 17], "merg": [14, 16, 53], "option": [14, 16, 18, 19, 52, 55], "encodingblock": 15, "non": [15, 17, 52], "linear": [15, 17, 52], "neural": [15, 17, 52, 53], "network": [15, 17, 19, 52, 53], "tupl": [15, 17, 22], "downscal": [15, 17], "half_channel": 16, "double_height": 16, "double_width": 16, "embedding_s": [16, 17, 19], "double_channel": 17, "half_height": 17, "half_width": 17, "num_head": 18, "dim_feedforward": 18, "implement": [18, 19, 23, 27], "self": [18, 19, 50, 53], "attent": [18, 19, 53], "imag": [18, 22, 23, 37, 38, 39], "desir": 18, "head": [18, 19], "hidden": [18, 19], "feedforward": [18, 19], "default": [18, 19], "us": [18, 19, 24, 52, 53, 54, 55], "uninstanti": 18, "num_encoding_block": 19, "time_emb_s": 19, "init_channel": 19, "64": [19, 22, 53], "true": [19, 52, 53], "architectur": 19, "close": 19, "origin": [19, 52], "paper": 19, "transpos": [19, 24], "upsampl": 19, "same": [19, 52, 53], "pad": 19, "ha": [19, 22, 52], "flexibl": 19, "go": [19, 52, 55], "larger": [19, 52], "depth": 19, "than": [19, 52], "separ": [19, 52], "addit": [19, 30, 53], "possibl": 19, "inject": 19, "condit": [19, 52, 54], "more": [19, 52], "make": [19, 52, 55], "sure": [19, 52], "odd": 19, "still": [19, 52], "even": 19, "bottleneck": [19, 52], "thei": [19, 52, 53], "divis": 19, "num_encod": 19, "yield": 19, "an": [19, 52, 53], "best": 19, "just": [19, 52], "stick": 19, "power": 19, "ronneberger15": 19, "o": 19, "ronneberg": 19, "p": [19, 52], "fischer": 19, "brox": 19, "u": 19, "net": [19, 52], "biomed": 19, "param": 19, "how": [19, 52], "mani": [19, 52], "basic": [19, 23], "each": [19, 53], "doubl": 19, "half": [19, 52], "resolut": 19, "start": [19, 52, 53, 54], "e": [19, 52, 53], "g": [19, 52, 53], "step": [19, 52, 53], "debbug": 19, "transform": 19, "usual": [19, 22, 52, 53], "128": [19, 22], "hidden_dim": [21, 22, 27], "resnet": [22, 23], "For": [22, 23, 52], "exact": 22, "detail": [22, 52], "he": [22, 23], "residu": [22, 23, 53], "recognit": [22, 23, 53], "2015": [22, 23, 53], "imagenet": 22, "crop": 22, "224x224": 22, "decreas": 22, "56x56": 22, "befor": [22, 52], "repeat": [22, 37, 38, 52, 53], "begin": [22, 52], "we": [22, 52, 53, 54], "split": 22, "submodul": 22, "where": [22, 52, 53], "consist": 22, "standard": 22, "halv": 22, "stride": [22, 24], "b": 22, "512": 22, "7x7": 22, "current": 23, "limit": 23, "usag": 23, "resnet18": [23, 24], "resnet34": [23, 24], "visual": 23, "fig": [23, 52], "union": [23, 24], "variat": 27, "autoencod": [27, 53], "sigma": [30, 31, 32], "appli": [30, 31, 52, 53], "multipl": 31, "creat": [32, 52, 54, 55], "mask_typ": [34, 35], "rel_sigma": [34, 37, 38, 39], "undersampling_r": 34, "random_se": 34, "42": 34, "devic": [34, 35, 52], "undersampling_ratio": [35, 40, 41, 42], "liter": [36, 52], "brain": 36, "knee": 36, "1d": [37, 38], "along": [37, 38], "horizont": [37, 40], "std": [37, 38, 39], "dev": [37, 38, 39], "2d": [37, 38, 39, 40, 41, 42], "last": [37, 38, 39, 40, 41, 42, 52, 53], "dim": [37, 38, 39, 40, 41, 42, 53], "vertic": [38, 41], "regular": [40, 41, 42], "subsampl": [40, 41, 42], "line": [40, 41], "given": [40, 41, 42, 52], "undersampl": [40, 41, 42, 53], "ratio": [40, 41, 42], "integ": [40, 41, 42], "repres": [40, 41, 42, 52], "acceler": [40, 41, 42, 54], "mask": [43, 53], "byte": 46, "dict": 48, "dot": 48, "notat": [48, 52], "access": 48, "dictionari": 48, "object": [50, 52], "__call__": 50, "give": 52, "concis": 52, "overview": 52, "you": [52, 54, 55], "have": [52, 53], "done": 52, "reader": 52, "shall": 52, "abl": 52, "decid": 52, "which": 52, "been": 52, "interest": 52, "him": 52, "read": 52, "provid": 52, "brief": 52, "account": 52, "follow": 52, "question": 52, "what": [52, 53], "problem": 52, "did": 52, "tackl": 52, "were": 52, "your": 52, "find": 52, "why": 52, "ar": [52, 53], "signific": 52, "approxim": 52, "cover": 52, "page": 52, "doe": 52, "contain": 52, "citat": 52, "In": [52, 53], "evalu": [52, 53], "tabl": 52, "graph": 52, "etc": 52, "program": 52, "code": 52, "further": 52, "transit": 52, "q": 52, "bm": 52, "_t": 52, "_": 52, "mathcal": 52, "n": 52, "sqrt": 52, "beta_t": 52, "reparameter": 52, "alpha": 52, "beta": [52, 53], "introduc": 52, "alpha_t": 52, "can": [52, 53], "also": [52, 53], "coher": 52, "index": 52, "benefici": 52, "switch": 52, "random": 52, "epsilon_": 52, "label": 52, "eq": 52, "forward_randomvar": 52, "sim": 52, "earlier": 52, "recurs": 52, "insert": 52, "formula": 52, "recal": 52, "sum": 52, "z": 52, "y": 52, "normal": 52, "mu_x": 52, "sigma_i": 52, "mu_i": 52, "again": [52, 53], "accord": 52, "sigma_x": 52, "align": 52, "x_t": 52, "left": [52, 53], "alpha_": 52, "epsilon": 52, "right": 52, "bar": 52, "end": 52, "term": 52, "cours": 52, "simplifi": 52, "exactli": 52, "therefor": 52, "final": 52, "prod_": 52, "": 52, "evid": 52, "often": 52, "section": 52, "fuse": 52, "interpret": 52, "raw": 52, "latex": 52, "cite": 52, "day2006wap": 52, "do": [52, 53], "here": 52, "recapitul": 52, "describ": 52, "principl": 52, "relationship": 52, "shown": 52, "mention": 52, "inconsist": 52, "except": 52, "found": 52, "other": 52, "show": 52, "agre": 52, "disagre": 52, "reli": 52, "inform": [52, 53], "present": 52, "implic": 52, "applic": 52, "mai": 52, "might": 52, "act": 52, "pair": 52, "answer": 52, "ask": 52, "wai": 52, "research": [52, 53], "experiment": 52, "setup": 52, "methodologi": 52, "conduct": 52, "clear": 52, "If": [52, 55], "produc": 52, "lot": [52, 53], "onli": [52, 53, 54], "put": 52, "ho": 52, "had": 52, "solut": 52, "ddpm": [52, 54], "nichol": 52, "investig": 52, "altern": 52, "nois": [52, 53], "autocit": 52, "ho2020denois": 52, "nichol2021improv": 52, "conclud": 52, "import": 52, "ones": 52, "respons": 52, "destruct": 52, "squar": 52, "cosin": 52, "would": [52, 55], "smooth": 52, "toward": 52, "critic": 52, "behav": 52, "approach": 52, "It": [52, 54], "immedi": 52, "visibl": 52, "reach": 52, "too": 52, "earli": 52, "flatten": 52, "lead": 52, "intuit": [52, 53], "few": [52, 53], "veri": 52, "intut": 52, "confirm": 52, "measur": 52, "isotrop": 52, "when": 52, "sampl": [52, 53], "through": [52, 53], "50": 52, "differ": 52, "covari": 52, "matrix": 52, "As": 52, "metric": 52, "ident": 52, "pure": 52, "d": [52, 53], "subtract": 52, "absolut": 52, "seen": 52, "closest": 52, "alreadi": 52, "after": 52, "around": [52, 53], "600": 52, "small": [52, 53], "700": 52, "wors": 52, "smaller": 52, "capabl": 52, "least": 52, "850": 52, "topic": 52, "rational": 52, "suffici": 52, "narrow": 52, "down": 52, "particular": 52, "allow": [52, 53], "understand": 52, "scope": 52, "abov": 52, "background": 52, "briefli": 52, "help": 52, "pick": 52, "text": [52, 53], "outlin": 52, "structur": [52, 53], "document": 52, "look": [52, 53], "howev": 52, "chapter": 52, "chang": [52, 55], "name": [52, 53], "requir": 52, "tool": 52, "environ": [52, 55], "taken": 52, "place": 52, "softwar": 52, "packag": 52, "system": 52, "algorithm": 52, "concept": 52, "math": 52, "perhap": 52, "kei": 52, "compon": 52, "framework": 52, "develop": [52, 54], "next": 52, "stem": 52, "statist": 52, "theorem": 52, "written": 52, "frac": 52, "implicitli": 52, "assum": 52, "densiti": 52, "continu": 52, "hold": 52, "letter": 52, "unobserv": 52, "train": 52, "new": [52, 53], "wherea": 52, "observ": 52, "four": 52, "distinct": 52, "margin": 52, "likelihood": 52, "encompass": 52, "actual": 52, "prior": [52, 53], "expos": 52, "ani": [52, 53], "posterior": 52, "post": 52, "exampl": 52, "choos": [52, 53], "specif": 52, "One": [52, 53], "most": 52, "straightforward": 52, "goal": 52, "represent": [52, 53], "vae": 52, "kingma2022autoencod": 52, "tri": 52, "recreat": 52, "its": [52, 53], "therebi": 52, "compress": 52, "doi": 52, "org": 52, "1002": 52, "aic": 52, "690370209": 52, "bear": 52, "similar": 52, "reduct": 52, "princip": 52, "analysi": 52, "pca": 52, "publish": 52, "under": [52, 54], "nonlinear": 52, "part": [52, 54], "fact": 52, "rather": 52, "optim": 52, "combin": 52, "parameter": 52, "p_": 52, "theta_z": 52, "map": 52, "theta_": 52, "chosen": 52, "multivari": 52, "theta": 52, "dz": 52, "nn_": 52, "anoth": 52, "intract": 52, "A": 52, "schemat": 52, "stochast": 52, "determinist": 52, "rightarrow": 52, "f_": 52, "hope": 52, "remov": 52, "gradual": 52, "destroi": 52, "iter": 52, "invert": 52, "suggest": 52, "content": 52, "_0": 52, "our": 52, "partial": 52, "noisi": 52, "intermedi": 52, "almost": 52, "larg": 52, "zero": 52, "vector": [52, 53], "onc": [52, 53], "less": 52, "some": 52, "until": 52, "discret": 52, "whole": 52, "express": 52, "markov": 52, "chain": 52, "depict": 52, "gladli": 52, "necessari": 52, "arriv": 52, "procedur": 52, "forward_alpha": 52, "cumul": 52, "product": 52, "forward_alphadash": 52, "depend": 52, "beyond": 52, "simpl": 52, "case": 52, "constant": 52, "opt": 52, "grow": 52, "linearli": 52, "later": 52, "better": [52, 53], "quit": 52, "quickli": 52, "own": 52, "explor": 52, "explain": 52, "view": [52, 53], "adversari": 52, "goodfellow2014gen": 52, "full": 52, "invers": 52, "gan": [52, 53], "ma": 52, "th": 52, "mathca": 52, "l": 52, "k_1": 52, "k_2": 52, "estim": 52, "want": 52, "corrupt": 52, "solv": 52, "try": [52, 53], "q_": 52, "match": [52, 53], "differenti": 52, "sens": 52, "successfulli": 52, "arjovsky2017wasserstein": 52, "previous": 52, "field": 52, "purpos": 52, "mind": 52, "relev": 52, "extent": 52, "without": 52, "literatur": 52, "compil": 52, "nich": 52, "lai": 52, "groundwork": 52, "select": 52, "enabl": 52, "my": [52, 53], "subtitl": 52, "master": 52, "eckhart": 52, "immerheis": 52, "depart": 52, "dvisor": 52, "egon": 52, "hasenfratz": 52, "schreier": 52, "upervisor": 52, "prof": 52, "dr": 52, "luc": 52, "van": 52, "gool": 52, "januari": 52, "fastmri": 53, "nyu": 53, "facebook": 53, "mix": 53, "precis": 53, "jake": 53, "tae": 53, "elbo": 53, "lilian": 53, "weng": 53, "supervis": 53, "flow": 53, "wgan": 53, "valentin": 53, "de": 53, "bortoli": 53, "yang": 53, "song": 53, "score": 53, "group": 53, "recurr": 53, "medic": 53, "pancrea": 53, "collect": 53, "scale": 53, "scalabl": 53, "quantiz": 53, "synthesi": 53, "stabl": 53, "2016": 53, "2018": 53, "respect": 53, "With": 53, "100": 53, "could": 53, "batchnorm2d": 53, "track_running_stat": 53, "shift": 53, "thing": [53, 54], "essenti": 53, "took": 53, "now": 53, "seem": 53, "littl": 53, "bit": 53, "counterintuit": 53, "opinion": 53, "global": 53, "per": 53, "pixel": 53, "oper": 53, "singl": 53, "indic": 53, "mini": 53, "don": [53, 55], "affin": 53, "2022": 53, "pretrain": 53, "uncondit": 53, "region": 53, "goe": 53, "backward": 53, "infer": 53, "resampl": 53, "semant": 53, "reconstruct": [53, 54], "complet": 53, "fix": 53, "amount": 53, "revers": 53, "schedul": 53, "propos": 53, "greatli": 53, "improv": 53, "qualiti": 53, "human": 53, "lpip": 53, "2021": 53, "low": 53, "frequenc": 53, "sdedit": 53, "denois": [53, 54], "somehow": 53, "result": 53, "python": 54, "librari": 54, "being": 54, "thesi": 54, "fall": 54, "semest": 54, "2023": 54, "eth": 54, "zurich": 54, "offer": 54, "everyth": 54, "acquisit": 54, "probabilist": 54, "Not": 54, "yet": 54, "re": 54, "intend": 55, "model": 55, "els": 55, "recommend": 55, "git": 55, "clone": 55, "com": 55, "liopeer": 55, "diffusionmodel": 55, "cd": 55, "env": 55, "f": 55, "yml": 55, "liotorch": 55, "pip": 55}, "objects": {"diffusion_models": [[0, 0, 0, "-", "losses"], [4, 0, 0, "-", "models"], [28, 0, 0, "-", "mri_forward"], [44, 0, 0, "-", "utils"]], "diffusion_models.losses": [[1, 0, 0, "-", "kl_divergence"]], "diffusion_models.losses.kl_divergence": [[2, 1, 1, "", "gaussian_kl"], [3, 1, 1, "", "log_gaussian_kl"]], "diffusion_models.models": [[5, 0, 0, "-", "mnist_enc"], [7, 0, 0, "-", "multicoil"], [10, 0, 0, "-", "positional_encoding"], [13, 0, 0, "-", "unet"], [20, 0, 0, "-", "vae"]], "diffusion_models.models.mnist_enc": [[6, 2, 1, "", "MNISTEncoder"]], "diffusion_models.models.mnist_enc.MNISTEncoder": [[6, 3, 1, "", "forward"]], "diffusion_models.models.multicoil": [[8, 2, 1, "", "MultiCoilConv2d"], [9, 2, 1, "", "MultiCoilReducer"]], "diffusion_models.models.multicoil.MultiCoilConv2d": [[8, 3, 1, "", "forward"]], "diffusion_models.models.multicoil.MultiCoilReducer": [[9, 3, 1, "", "forward"]], "diffusion_models.models.positional_encoding": [[11, 2, 1, "", "PositionalEncoding"], [12, 2, 1, "", "PositionalEncoding2D"]], "diffusion_models.models.positional_encoding.PositionalEncoding": [[11, 3, 1, "", "forward"], [11, 3, 1, "", "get_pos_encoding"]], "diffusion_models.models.positional_encoding.PositionalEncoding2D": [[12, 3, 1, "", "forward"]], "diffusion_models.models.unet": [[14, 2, 1, "", "AttentionDecodingBlock"], [15, 2, 1, "", "AttentionEncodingBlock"], [16, 2, 1, "", "DecodingBlock"], [17, 2, 1, "", "EncodingBlock"], [18, 2, 1, "", "SelfAttention"], [19, 2, 1, "", "UNet"]], "diffusion_models.models.unet.AttentionDecodingBlock": [[14, 3, 1, "", "forward"]], "diffusion_models.models.unet.AttentionEncodingBlock": [[15, 3, 1, "", "forward"]], "diffusion_models.models.unet.DecodingBlock": [[16, 3, 1, "", "forward"]], "diffusion_models.models.unet.EncodingBlock": [[17, 3, 1, "", "forward"]], "diffusion_models.models.unet.SelfAttention": [[18, 3, 1, "", "forward"]], "diffusion_models.models.unet.UNet": [[19, 3, 1, "", "forward"]], "diffusion_models.models.vae": [[21, 2, 1, "", "ResNet18Decoder"], [22, 2, 1, "", "ResNet18Encoder"], [23, 2, 1, "", "ResNetBlock"], [24, 2, 1, "", "ResNetDecoderBlock"], [25, 2, 1, "", "SkipDownSampler"], [26, 2, 1, "", "SkipUpSampler"], [27, 2, 1, "", "VariationalAutoencoder"]], "diffusion_models.models.vae.ResNet18Decoder": [[21, 3, 1, "", "forward"]], "diffusion_models.models.vae.ResNet18Encoder": [[22, 3, 1, "", "forward"]], "diffusion_models.models.vae.ResNetBlock": [[23, 3, 1, "", "forward"]], "diffusion_models.models.vae.ResNetDecoderBlock": [[24, 3, 1, "", "forward"]], "diffusion_models.models.vae.SkipDownSampler": [[25, 3, 1, "", "forward"]], "diffusion_models.models.vae.SkipUpSampler": [[26, 3, 1, "", "forward"]], "diffusion_models.models.vae.VariationalAutoencoder": [[27, 3, 1, "", "forward"]], "diffusion_models.mri_forward": [[29, 0, 0, "-", "noise"], [33, 0, 0, "-", "undersampling_mask"]], "diffusion_models.mri_forward.noise": [[30, 1, 1, "", "apply_add_gauss_noise"], [31, 1, 1, "", "apply_mult_gauss_noise"], [32, 1, 1, "", "independent_gauss_noise"]], "diffusion_models.mri_forward.undersampling_mask": [[34, 2, 1, "", "StochasticUndersamplingMask"], [35, 2, 1, "", "UndersamplingMask"], [36, 1, 1, "", "apply_fMRI_uSampleMask"], [37, 1, 1, "", "gaussian_kernel1d_h"], [38, 1, 1, "", "gaussian_kernel1d_v"], [39, 1, 1, "", "gaussian_kernel2d"], [40, 1, 1, "", "naive_undersampling1d_h"], [41, 1, 1, "", "naive_undersampling1d_v"], [42, 1, 1, "", "naive_undersampling2d"], [43, 1, 1, "", "normalize_mask"]], "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask": [[34, 3, 1, "", "forward"]], "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask": [[35, 3, 1, "", "forward"]], "diffusion_models.utils": [[45, 0, 0, "-", "helpers"], [49, 0, 0, "-", "mp_setup"]], "diffusion_models.utils.helpers": [[46, 1, 1, "", "bytes_to_gb"], [47, 1, 1, "", "complex_to_2channelfloat"], [48, 2, 1, "", "dotdict"]], "diffusion_models.utils.mp_setup": [[50, 2, 1, "", "DDP_Proc_Group"]], "diffusion_models.utils.mp_setup.DDP_Proc_Group": [[50, 3, 1, "", "__call__"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"diffusion_model": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], "loss": [0, 1, 2, 3, 52], "kl_diverg": [1, 2, 3], "gaussian_kl": 2, "log_gaussian_kl": 3, "model": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 52, 53, 54], "mnist_enc": [5, 6], "mnistencod": 6, "multicoil": [7, 8, 9], "multicoilconv2d": 8, "multicoilreduc": 9, "positional_encod": [10, 11, 12], "positionalencod": 11, "positionalencoding2d": 12, "unet": [13, 14, 15, 16, 17, 18, 19], "attentiondecodingblock": 14, "attentionencodingblock": 15, "decodingblock": 16, "encodingblock": 17, "selfattent": 18, "thing": 19, "ar": 19, "differ": 19, "kernel": 19, "size": [19, 52], "imag": [19, 52, 53], "vae": [20, 21, 22, 23, 24, 25, 26, 27, 53], "resnet18decod": 21, "resnet18encod": 22, "implement": 22, "resnetblock": 23, "resnetdecoderblock": 24, "skipdownsampl": 25, "skipupsampl": 26, "variationalautoencod": 27, "mri_forward": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43], "nois": [29, 30, 31, 32], "apply_add_gauss_nois": 30, "apply_mult_gauss_nois": 31, "independent_gauss_nois": 32, "undersampling_mask": [33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43], "stochasticundersamplingmask": 34, "undersamplingmask": 35, "apply_fmri_usamplemask": 36, "gaussian_kernel1d_h": 37, "gaussian_kernel1d_v": 38, "gaussian_kernel2d": 39, "naive_undersampling1d_h": 40, "naive_undersampling1d_v": 41, "naive_undersampling2d": 42, "normalize_mask": 43, "util": [44, 45, 46, 47, 48, 49, 50], "helper": [45, 46, 47, 48], "bytes_to_gb": 46, "complex_to_2channelfloat": 47, "dotdict": 48, "mp_setup": [49, 50], "ddp_proc_group": 50, "api": 51, "abstract": 52, "acknowledg": 52, "The": 52, "first": 52, "appendix": 52, "extend": 52, "deriv": 52, "forward": 52, "process": 52, "close": 52, "form": 52, "conclus": 52, "discuss": 52, "experi": 52, "result": 52, "influenc": 52, "schedul": 52, "diffus": [52, 53, 54], "introduct": 52, "focu": 52, "thi": 52, "work": 52, "thesi": 52, "organ": 52, "materi": 52, "method": 52, "gener": [52, 53, 55], "machin": 52, "learn": 52, "bayesian": [52, 53], "formul": 52, "latent": 52, "variabl": 52, "variat": 52, "autoencod": 52, "denois": 52, "probabilist": 52, "mathemat": 52, "descript": 52, "function": 52, "revers": 52, "compar": 52, "kullback": 52, "leibler": 52, "diverg": 52, "wasserstein": 52, "distanc": 52, "lower": 52, "bound": 52, "relat": 52, "idea": 53, "corner": 53, "public": 53, "dataset": 53, "train": 53, "strategi": 53, "perspect": 53, "ai": 53, "normal": 53, "paper": 53, "u": 53, "net": 53, "variant": 53, "transform": 53, "rel": 53, "posit": 53, "encod": 53, "sophist": 53, "ddpm": 53, "batchnorm": 53, "v": 53, "layernorm": 53, "instancenorm": 53, "groupnorm": 53, "inpaint": 53, "repaint": 53, "condit": 53, "ilvr": 53, "sedit": 53, "mri": 54, "instal": 55, "usag": 55, "conda": 55, "docker": 55, "develop": 55}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"diffusion_models.losses": [[0, "module-diffusion_models.losses"]], "diffusion_models.losses.kl_divergence": [[1, "module-diffusion_models.losses.kl_divergence"]], "diffusion_models.losses.kl_divergence.gaussian_kl": [[2, "diffusion-models-losses-kl-divergence-gaussian-kl"]], "diffusion_models.losses.kl_divergence.log_gaussian_kl": [[3, "diffusion-models-losses-kl-divergence-log-gaussian-kl"]], "diffusion_models.models": [[4, "module-diffusion_models.models"]], "diffusion_models.models.mnist_enc": [[5, "module-diffusion_models.models.mnist_enc"]], "diffusion_models.models.mnist_enc.MNISTEncoder": [[6, "diffusion-models-models-mnist-enc-mnistencoder"]], "diffusion_models.models.multicoil": [[7, "module-diffusion_models.models.multicoil"]], "diffusion_models.models.multicoil.MultiCoilConv2d": [[8, "diffusion-models-models-multicoil-multicoilconv2d"]], "diffusion_models.models.multicoil.MultiCoilReducer": [[9, "diffusion-models-models-multicoil-multicoilreducer"]], "diffusion_models.models.positional_encoding": [[10, "module-diffusion_models.models.positional_encoding"]], "diffusion_models.models.positional_encoding.PositionalEncoding": [[11, "diffusion-models-models-positional-encoding-positionalencoding"]], "diffusion_models.models.positional_encoding.PositionalEncoding2D": [[12, "diffusion-models-models-positional-encoding-positionalencoding2d"]], "diffusion_models.models.unet": [[13, "module-diffusion_models.models.unet"]], "diffusion_models.models.unet.AttentionDecodingBlock": [[14, "diffusion-models-models-unet-attentiondecodingblock"]], "diffusion_models.models.unet.AttentionEncodingBlock": [[15, "diffusion-models-models-unet-attentionencodingblock"]], "diffusion_models.models.unet.DecodingBlock": [[16, "diffusion-models-models-unet-decodingblock"]], "diffusion_models.models.unet.EncodingBlock": [[17, "diffusion-models-models-unet-encodingblock"]], "diffusion_models.models.unet.SelfAttention": [[18, "diffusion-models-models-unet-selfattention"]], "diffusion_models.models.unet.UNet": [[19, "diffusion-models-models-unet-unet"]], "Things that are different": [[19, "things-that-are-different"]], "Kernel sizes": [[19, "kernel-sizes"]], "Images sizes": [[19, "images-sizes"]], "diffusion_models.models.vae": [[20, "module-diffusion_models.models.vae"]], "diffusion_models.models.vae.ResNet18Decoder": [[21, "diffusion-models-models-vae-resnet18decoder"]], "diffusion_models.models.vae.ResNet18Encoder": [[22, "diffusion-models-models-vae-resnet18encoder"]], "Implementation": [[22, "implementation"]], "diffusion_models.models.vae.ResNetBlock": [[23, "diffusion-models-models-vae-resnetblock"]], "diffusion_models.models.vae.ResNetDecoderBlock": [[24, "diffusion-models-models-vae-resnetdecoderblock"]], "diffusion_models.models.vae.SkipDownSampler": [[25, "diffusion-models-models-vae-skipdownsampler"]], "diffusion_models.models.vae.SkipUpSampler": [[26, "diffusion-models-models-vae-skipupsampler"]], "diffusion_models.models.vae.VariationalAutoencoder": [[27, "diffusion-models-models-vae-variationalautoencoder"]], "diffusion_models.mri_forward": [[28, "module-diffusion_models.mri_forward"]], "diffusion_models.mri_forward.noise": [[29, "module-diffusion_models.mri_forward.noise"]], "diffusion_models.mri_forward.noise.apply_add_gauss_noise": [[30, "diffusion-models-mri-forward-noise-apply-add-gauss-noise"]], "diffusion_models.mri_forward.noise.apply_mult_gauss_noise": [[31, "diffusion-models-mri-forward-noise-apply-mult-gauss-noise"]], "diffusion_models.mri_forward.noise.independent_gauss_noise": [[32, "diffusion-models-mri-forward-noise-independent-gauss-noise"]], "diffusion_models.mri_forward.undersampling_mask": [[33, "module-diffusion_models.mri_forward.undersampling_mask"]], "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask": [[34, "diffusion-models-mri-forward-undersampling-mask-stochasticundersamplingmask"]], "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask": [[35, "diffusion-models-mri-forward-undersampling-mask-undersamplingmask"]], "diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask": [[36, "diffusion-models-mri-forward-undersampling-mask-apply-fmri-usamplemask"]], "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h": [[37, "diffusion-models-mri-forward-undersampling-mask-gaussian-kernel1d-h"]], "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v": [[38, "diffusion-models-mri-forward-undersampling-mask-gaussian-kernel1d-v"]], "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d": [[39, "diffusion-models-mri-forward-undersampling-mask-gaussian-kernel2d"]], "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h": [[40, "diffusion-models-mri-forward-undersampling-mask-naive-undersampling1d-h"]], "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v": [[41, "diffusion-models-mri-forward-undersampling-mask-naive-undersampling1d-v"]], "diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d": [[42, "diffusion-models-mri-forward-undersampling-mask-naive-undersampling2d"]], "diffusion_models.mri_forward.undersampling_mask.normalize_mask": [[43, "diffusion-models-mri-forward-undersampling-mask-normalize-mask"]], "diffusion_models.utils": [[44, "module-diffusion_models.utils"]], "diffusion_models.utils.helpers": [[45, "module-diffusion_models.utils.helpers"]], "diffusion_models.utils.helpers.bytes_to_gb": [[46, "diffusion-models-utils-helpers-bytes-to-gb"]], "diffusion_models.utils.helpers.complex_to_2channelfloat": [[47, "diffusion-models-utils-helpers-complex-to-2channelfloat"]], "diffusion_models.utils.helpers.dotdict": [[48, "diffusion-models-utils-helpers-dotdict"]], "diffusion_models.utils.mp_setup": [[49, "module-diffusion_models.utils.mp_setup"]], "diffusion_models.utils.mp_setup.DDP_Proc_Group": [[50, "diffusion-models-utils-mp-setup-ddp-proc-group"]], "API": [[51, "api"]], "Abstract": [[52, "abstract"]], "Acknowledgements": [[52, "acknowledgements"]], "The First Appendix": [[52, "the-first-appendix"]], "Extended Derivations": [[52, "extended-derivations"]], "Forward Process Closed-Form": [[52, "forward-process-closed-form"]], "Conclusion": [[52, "conclusion"]], "Discussion": [[52, "discussion"]], "Experiments and Results": [[52, "experiments-and-results"]], "Influence of Schedules and Image Size on the Forward Diffusion": [[52, "influence-of-schedules-and-image-size-on-the-forward-diffusion"]], "Introduction": [[52, "introduction"]], "Focus of this Work": [[52, "focus-of-this-work"]], "Thesis Organization": [[52, "thesis-organization"]], "Materials and Methods": [[52, "materials-and-methods"]], "Generative Machine Learning": [[52, "generative-machine-learning"]], "Bayesian Formulation of Latent Variable Models": [[52, "bayesian-formulation-of-latent-variable-models"]], "Variational Autoencoders": [[52, "variational-autoencoders"]], "Diffusion Denoising Probabilistic Models": [[52, "diffusion-denoising-probabilistic-models"]], "Forward Diffusion Process": [[52, "forward-diffusion-process"]], "Mathematical Description": [[52, "mathematical-description"]], "Influence of Scheduling Functions": [[52, "influence-of-scheduling-functions"]], "Reverse Diffusion Process": [[52, "reverse-diffusion-process"]], "Latent Variable Models Compared": [[52, "latent-variable-models-compared"]], "Loss Functions": [[52, "loss-functions"]], "Kullback-Leibler Divergence": [[52, "kullback-leibler-divergence"]], "Wasserstein Distance": [[52, "wasserstein-distance"]], "Variational Lower Bound": [[52, "variational-lower-bound"]], "Related Work": [[52, "related-work"]], "Idea Corner": [[53, "idea-corner"]], "Public Datasets": [[53, "public-datasets"]], "Training Strategies": [[53, "training-strategies"]], "Bayesian Perspective on Generative AI": [[53, "bayesian-perspective-on-generative-ai"]], "Normalization Papers": [[53, "normalization-papers"]], "U-Net Variants": [[53, "u-net-variants"]], "Diffusion Models with Transformers": [[53, "diffusion-models-with-transformers"]], "Relative Positional Encodings": [[53, "relative-positional-encodings"]], "Sophisticated VAE/DDPMs": [[53, "sophisticated-vae-ddpms"]], "BatchNorm vs. LayerNorm vs. InstanceNorm vs. GroupNorm": [[53, "batchnorm-vs-layernorm-vs-instancenorm-vs-groupnorm"]], "BatchNorm": [[53, "batchnorm"]], "LayerNorm": [[53, "layernorm"]], "InstanceNorm": [[53, "instancenorm"]], "GroupNorm": [[53, "groupnorm"]], "": [[53, "id1"]], "Image Inpainting": [[53, "image-inpainting"]], "RePaint": [[53, "repaint"]], "Image-Conditioned Diffusion Models": [[53, "image-conditioned-diffusion-models"]], "ILVR": [[53, "ilvr"]], "SEdit": [[53, "sedit"]], "Diffusion Models for MRI": [[54, "diffusion-models-for-mri"]], "Installation": [[55, "installation"]], "General Usage": [[55, "general-usage"]], "Conda": [[55, "conda"], [55, "id3"]], "Docker": [[55, "docker"], [55, "id4"]], "Development": [[55, "development"]]}, "indexentries": {"diffusion_models.losses": [[0, "module-diffusion_models.losses"]], "module": [[0, "module-diffusion_models.losses"], [1, "module-diffusion_models.losses.kl_divergence"], [4, "module-diffusion_models.models"], [5, "module-diffusion_models.models.mnist_enc"], [7, "module-diffusion_models.models.multicoil"], [10, "module-diffusion_models.models.positional_encoding"], [13, "module-diffusion_models.models.unet"], [20, "module-diffusion_models.models.vae"], [28, "module-diffusion_models.mri_forward"], [29, "module-diffusion_models.mri_forward.noise"], [33, "module-diffusion_models.mri_forward.undersampling_mask"], [44, "module-diffusion_models.utils"], [45, "module-diffusion_models.utils.helpers"], [49, "module-diffusion_models.utils.mp_setup"]], "diffusion_models.losses.kl_divergence": [[1, "module-diffusion_models.losses.kl_divergence"]], "gaussian_kl() (in module diffusion_models.losses.kl_divergence)": [[2, "diffusion_models.losses.kl_divergence.gaussian_kl"]], "log_gaussian_kl() (in module diffusion_models.losses.kl_divergence)": [[3, "diffusion_models.losses.kl_divergence.log_gaussian_kl"]], "diffusion_models.models": [[4, "module-diffusion_models.models"]], "diffusion_models.models.mnist_enc": [[5, "module-diffusion_models.models.mnist_enc"]], "mnistencoder (class in diffusion_models.models.mnist_enc)": [[6, "diffusion_models.models.mnist_enc.MNISTEncoder"]], "forward() (diffusion_models.models.mnist_enc.mnistencoder method)": [[6, "diffusion_models.models.mnist_enc.MNISTEncoder.forward"]], "diffusion_models.models.multicoil": [[7, "module-diffusion_models.models.multicoil"]], "multicoilconv2d (class in diffusion_models.models.multicoil)": [[8, "diffusion_models.models.multicoil.MultiCoilConv2d"]], "forward() (diffusion_models.models.multicoil.multicoilconv2d method)": [[8, "diffusion_models.models.multicoil.MultiCoilConv2d.forward"]], "multicoilreducer (class in diffusion_models.models.multicoil)": [[9, "diffusion_models.models.multicoil.MultiCoilReducer"]], "forward() (diffusion_models.models.multicoil.multicoilreducer method)": [[9, "diffusion_models.models.multicoil.MultiCoilReducer.forward"]], "diffusion_models.models.positional_encoding": [[10, "module-diffusion_models.models.positional_encoding"]], "positionalencoding (class in diffusion_models.models.positional_encoding)": [[11, "diffusion_models.models.positional_encoding.PositionalEncoding"]], "forward() (diffusion_models.models.positional_encoding.positionalencoding method)": [[11, "diffusion_models.models.positional_encoding.PositionalEncoding.forward"]], "get_pos_encoding() (diffusion_models.models.positional_encoding.positionalencoding method)": [[11, "diffusion_models.models.positional_encoding.PositionalEncoding.get_pos_encoding"]], "positionalencoding2d (class in diffusion_models.models.positional_encoding)": [[12, "diffusion_models.models.positional_encoding.PositionalEncoding2D"]], "forward() (diffusion_models.models.positional_encoding.positionalencoding2d method)": [[12, "diffusion_models.models.positional_encoding.PositionalEncoding2D.forward"]], "diffusion_models.models.unet": [[13, "module-diffusion_models.models.unet"]], "attentiondecodingblock (class in diffusion_models.models.unet)": [[14, "diffusion_models.models.unet.AttentionDecodingBlock"]], "forward() (diffusion_models.models.unet.attentiondecodingblock method)": [[14, "diffusion_models.models.unet.AttentionDecodingBlock.forward"]], "attentionencodingblock (class in diffusion_models.models.unet)": [[15, "diffusion_models.models.unet.AttentionEncodingBlock"]], "forward() (diffusion_models.models.unet.attentionencodingblock method)": [[15, "diffusion_models.models.unet.AttentionEncodingBlock.forward"]], "decodingblock (class in diffusion_models.models.unet)": [[16, "diffusion_models.models.unet.DecodingBlock"]], "forward() (diffusion_models.models.unet.decodingblock method)": [[16, "diffusion_models.models.unet.DecodingBlock.forward"]], "encodingblock (class in diffusion_models.models.unet)": [[17, "diffusion_models.models.unet.EncodingBlock"]], "forward() (diffusion_models.models.unet.encodingblock method)": [[17, "diffusion_models.models.unet.EncodingBlock.forward"]], "selfattention (class in diffusion_models.models.unet)": [[18, "diffusion_models.models.unet.SelfAttention"]], "forward() (diffusion_models.models.unet.selfattention method)": [[18, "diffusion_models.models.unet.SelfAttention.forward"]], "unet (class in diffusion_models.models.unet)": [[19, "diffusion_models.models.unet.UNet"]], "forward() (diffusion_models.models.unet.unet method)": [[19, "diffusion_models.models.unet.UNet.forward"]], "diffusion_models.models.vae": [[20, "module-diffusion_models.models.vae"]], "resnet18decoder (class in diffusion_models.models.vae)": [[21, "diffusion_models.models.vae.ResNet18Decoder"]], "forward() (diffusion_models.models.vae.resnet18decoder method)": [[21, "diffusion_models.models.vae.ResNet18Decoder.forward"]], "resnet18encoder (class in diffusion_models.models.vae)": [[22, "diffusion_models.models.vae.ResNet18Encoder"]], "forward() (diffusion_models.models.vae.resnet18encoder method)": [[22, "diffusion_models.models.vae.ResNet18Encoder.forward"]], "resnetblock (class in diffusion_models.models.vae)": [[23, "diffusion_models.models.vae.ResNetBlock"]], "forward() (diffusion_models.models.vae.resnetblock method)": [[23, "diffusion_models.models.vae.ResNetBlock.forward"]], "resnetdecoderblock (class in diffusion_models.models.vae)": [[24, "diffusion_models.models.vae.ResNetDecoderBlock"]], "forward() (diffusion_models.models.vae.resnetdecoderblock method)": [[24, "diffusion_models.models.vae.ResNetDecoderBlock.forward"]], "skipdownsampler (class in diffusion_models.models.vae)": [[25, "diffusion_models.models.vae.SkipDownSampler"]], "forward() (diffusion_models.models.vae.skipdownsampler method)": [[25, "diffusion_models.models.vae.SkipDownSampler.forward"]], "skipupsampler (class in diffusion_models.models.vae)": [[26, "diffusion_models.models.vae.SkipUpSampler"]], "forward() (diffusion_models.models.vae.skipupsampler method)": [[26, "diffusion_models.models.vae.SkipUpSampler.forward"]], "variationalautoencoder (class in diffusion_models.models.vae)": [[27, "diffusion_models.models.vae.VariationalAutoencoder"]], "forward() (diffusion_models.models.vae.variationalautoencoder method)": [[27, "diffusion_models.models.vae.VariationalAutoencoder.forward"]], "diffusion_models.mri_forward": [[28, "module-diffusion_models.mri_forward"]], "diffusion_models.mri_forward.noise": [[29, "module-diffusion_models.mri_forward.noise"]], "apply_add_gauss_noise() (in module diffusion_models.mri_forward.noise)": [[30, "diffusion_models.mri_forward.noise.apply_add_gauss_noise"]], "apply_mult_gauss_noise() (in module diffusion_models.mri_forward.noise)": [[31, "diffusion_models.mri_forward.noise.apply_mult_gauss_noise"]], "independent_gauss_noise() (in module diffusion_models.mri_forward.noise)": [[32, "diffusion_models.mri_forward.noise.independent_gauss_noise"]], "diffusion_models.mri_forward.undersampling_mask": [[33, "module-diffusion_models.mri_forward.undersampling_mask"]], "stochasticundersamplingmask (class in diffusion_models.mri_forward.undersampling_mask)": [[34, "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask"]], "forward() (diffusion_models.mri_forward.undersampling_mask.stochasticundersamplingmask method)": [[34, "diffusion_models.mri_forward.undersampling_mask.StochasticUndersamplingMask.forward"]], "undersamplingmask (class in diffusion_models.mri_forward.undersampling_mask)": [[35, "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask"]], "forward() (diffusion_models.mri_forward.undersampling_mask.undersamplingmask method)": [[35, "diffusion_models.mri_forward.undersampling_mask.UndersamplingMask.forward"]], "apply_fmri_usamplemask() (in module diffusion_models.mri_forward.undersampling_mask)": [[36, "diffusion_models.mri_forward.undersampling_mask.apply_fMRI_uSampleMask"]], "gaussian_kernel1d_h() (in module diffusion_models.mri_forward.undersampling_mask)": [[37, "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_h"]], "gaussian_kernel1d_v() (in module diffusion_models.mri_forward.undersampling_mask)": [[38, "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel1d_v"]], "gaussian_kernel2d() (in module diffusion_models.mri_forward.undersampling_mask)": [[39, "diffusion_models.mri_forward.undersampling_mask.gaussian_kernel2d"]], "naive_undersampling1d_h() (in module diffusion_models.mri_forward.undersampling_mask)": [[40, "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_h"]], "naive_undersampling1d_v() (in module diffusion_models.mri_forward.undersampling_mask)": [[41, "diffusion_models.mri_forward.undersampling_mask.naive_undersampling1d_v"]], "naive_undersampling2d() (in module diffusion_models.mri_forward.undersampling_mask)": [[42, "diffusion_models.mri_forward.undersampling_mask.naive_undersampling2d"]], "normalize_mask() (in module diffusion_models.mri_forward.undersampling_mask)": [[43, "diffusion_models.mri_forward.undersampling_mask.normalize_mask"]], "diffusion_models.utils": [[44, "module-diffusion_models.utils"]], "diffusion_models.utils.helpers": [[45, "module-diffusion_models.utils.helpers"]], "bytes_to_gb() (in module diffusion_models.utils.helpers)": [[46, "diffusion_models.utils.helpers.bytes_to_gb"]], "complex_to_2channelfloat() (in module diffusion_models.utils.helpers)": [[47, "diffusion_models.utils.helpers.complex_to_2channelfloat"]], "dotdict (class in diffusion_models.utils.helpers)": [[48, "diffusion_models.utils.helpers.dotdict"]], "diffusion_models.utils.mp_setup": [[49, "module-diffusion_models.utils.mp_setup"]], "ddp_proc_group (class in diffusion_models.utils.mp_setup)": [[50, "diffusion_models.utils.mp_setup.DDP_Proc_Group"]], "__call__() (diffusion_models.utils.mp_setup.ddp_proc_group method)": [[50, "diffusion_models.utils.mp_setup.DDP_Proc_Group.__call__"]]}}) \ No newline at end of file