Shortcuts

mmagic.models.editors.liif.liif

Module Contents

Classes

LIIF

LIIF model for single image super-resolution.

class mmagic.models.editors.liif.liif.LIIF(generator: dict, pixel_loss: dict, train_cfg: Optional[dict] = None, test_cfg: Optional[dict] = None, init_cfg: Optional[dict] = None, data_preprocessor: Optional[dict] = None)[source]

Bases: mmagic.models.base_models.BaseEditModel

LIIF model for single image super-resolution.

Paper: Learning Continuous Image Representation with

Local Implicit Image Function

Parameters
  • generator (dict) – Config for the generator.

  • pixel_loss (dict) – Config for the pixel loss.

  • pretrained (str) – Path for pretrained model. Default: None.

  • data_preprocessor (dict, optional) – The pre-process config of BaseDataPreprocessor.

forward_tensor(inputs, data_samples=None, **kwargs)[source]

Forward tensor. Returns result of simple forward.

Parameters
  • inputs (torch.Tensor) – batch input tensor collated by data_preprocessor.

  • data_samples (List[BaseDataElement], optional) – data samples collated by data_preprocessor.

Returns

result of simple forward.

Return type

Tensor

forward_inference(inputs, data_samples=None, **kwargs)[source]

Forward inference. Returns predictions of validation, testing, and simple inference.

Parameters
  • inputs (torch.Tensor) – batch input tensor collated by data_preprocessor.

  • data_samples (BaseDataElement, optional) – data samples collated by data_preprocessor.

Returns

predictions.

Return type

List[DataSample]

Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.