mmdeploy/codebase/mmedit/deploy/super_resolution_model.py
def forward(self,
                lq: torch.Tensor,
                test_mode: bool = False,
                *args,
                **kwargs) -> Union[list, dict]:
        """Run test inference for restorer.

        We want forward() to output an image or a evaluation result.
        When test_mode is set, the output is evaluation result. Otherwise
        it is an image.

        Args:
            lq (torch.Tensor): The input low-quality image of the model.
            test_mode (bool): When test_mode is set, the output is evaluation
                result. Otherwise it is an image. Default to `False`.
            *args: Other arguments.
            **kwargs: Other key-pair arguments.

        Returns:
            list | dict: High resolution image or a evaluation results.
        """

        if test_mode:
            return self.forward_test(lq, *args, **kwargs)
        else:
            return self.forward_dummy(lq, *args, **kwargs)
Run test inference for restorer.

        We want forward() to output an image or a evaluation result.
        When test_mode is set, the output is evaluation result. Otherwise
        it is an image.

        Args:
            lq (torch.Tensor): The input low-quality image of the model.
            test_mode (bool): When test_mode is set, the output is evaluation
                result. Otherwise it is an image. Default to `False`.
            *args: Other arguments.
            **kwargs: Other key-pair arguments.

        Returns:
            list | dict: High resolution image or a evaluation results.
        
Run test inference for restorer.
We want forward() to output an image or a evaluation result.
When test_mode is set, the output is evaluation result. Otherwise
it is an image.
Run test inference for restorer . We want forward () to output an image or a evaluation result . When test_mode is set the output is evaluation result . Otherwise it is an image .
def forward(self,
                lq: torch.Tensor,
                test_mode: bool = False,
                *args,
                **kwargs) -> Union[list, dict]:
        if test_mode:
            return self.forward_test(lq, *args, **kwargs)
        else:
            return self.forward_dummy(lq, *args, **kwargs)
def forward ( self , lq : torch . Tensor , test_mode : bool = False , * args , ** kwargs ) -> Union [ list , dict ] : if test_mode : return self . forward_test ( lq , * args , ** kwargs ) else : return self . forward_dummy ( lq , * args , ** kwargs )
Run test inference for restorer.
Run test inference for restorer .
"""Run test inference for restorer.

        We want forward() to output an image or a evaluation result.
        When test_mode is set, the output is evaluation result. Otherwise
        it is an image.

        Args:
            lq (torch.Tensor): The input low-quality image of the model.
            test_mode (bool): When test_mode is set, the output is evaluation
                result. Otherwise it is an image. Default to `False`.
            *args: Other arguments.
            **kwargs: Other key-pair arguments.

        Returns:
            list | dict: High resolution image or a evaluation results.
        """
list | dict: High resolution image or a evaluation results.
list | dict : High resolution image or a evaluation results .
self
lq
torch.Tensor
The input low-quality image of the model.
The input low - quality image of the model .
test_mode
bool
When test_mode is set, the output is evaluation
result. Otherwise it is an image. Default to `False`.
When test_mode is set the output is evaluation result . Otherwise it is an image . Default to ` False ` .
*args
None
**kwargs
Other key-pair arguments.
Other key - pair arguments .