thelper.nn.sr package

Neural network and model package for super resolution.

This package contains classes that define blocks and modules used in various neural network for super resolution architectures. Most of these classes have been adapted from external sources; see their individual headers for more information.

Submodules

thelper.nn.sr.srcnn module

class thelper.nn.sr.srcnn.SRCNN(task, num_channels=1, base_filter=64, groups=1)[source]

Bases: thelper.nn.utils.Module

Implements the SRCNN architecture.

See also

__init__(task, num_channels=1, base_filter=64, groups=1)[source]

Receives a task object to hold internally for model specialization.

forward(x)[source]

Transforms an input tensor in order to generate a prediction.

set_task(task)[source]

Adapts the model to support a new task, replacing layers if needed.

weight_init()[source]

thelper.nn.sr.vdsr module

class thelper.nn.sr.vdsr.VDSR(task, num_channels=1, base_filter=64, kernel_size0=3, num_residuals=18, groups=1, activation='relu', norm='batch')[source]

Bases: thelper.nn.utils.Module

Implements the VDSR architecture.

__init__(task, num_channels=1, base_filter=64, kernel_size0=3, num_residuals=18, groups=1, activation='relu', norm='batch')[source]

Receives a task object to hold internally for model specialization.

forward(x)[source]

Transforms an input tensor in order to generate a prediction.

set_task(task)[source]

Adapts the model to support a new task, replacing layers if needed.

weight_init()[source]