diffusion_models.models.openai_unet.Upsample

class diffusion_models.models.openai_unet.Upsample(*args: Any, **kwargs: Any)[source]

Bases: Module

An upsampling layer with an optional convolution.

Parameters:
  • channels – channels in the inputs and outputs.

  • use_conv – a bool determining if a convolution is applied.

  • dims – determines if the signal is 1D, 2D, or 3D. If 3D, then upsampling occurs in the inner-two dimensions.

__init__(channels, use_conv, dims=2)[source]

Methods

__init__(channels, use_conv[, dims])

forward(x)