in neuralcompression/models/deep_video_compression.py [0:0]
def forward(self, image: Tensor) -> Tensor:
upsample_size = tuple(image.shape[2:])
# residual block includes skipped connection
image = self.input_block(image)
# if we have a child, downsample, run it, and then upsample back
if self.child is not None:
image = image + F.interpolate(
self.child(F.avg_pool2d(image, kernel_size=2)),
size=upsample_size,
mode="nearest",
)
# residual block includes skipped connection
return self.output_block(image)