diffusion_models.models.vae.ResNetBlock

class diffusion_models.models.vae.ResNetBlock(in_channels, out_channels)[source]

Bases: Module

Class implementing the ResNet Basic Building Block, currently limited to usage in ResNet18 and ResNet34.

For visualization, see Fig. 2 in He et al: Deep Residual Learning for Image Recognition (2015).

__init__(in_channels, out_channels)[source]

Constructor of ResNetBlock.

Methods

__init__(in_channels, out_channels)

Constructor of ResNetBlock.

forward(x)

rtype:

Union[Tensor, 'batch channels height width'), Tensor, 'batch channels*2 height/2 width/2')]