def METHOD_NAME(
    self, inputs: Union[torch.Tensor, Sequence[torch.Tensor],
                        Dict[str, torch.Tensor]]
) -> Union[torch.Tensor, Sequence[torch.Tensor], Dict[str, torch.Tensor]]:
    """Run forward inference.
    Args:
        inputs (torch.Tensor | Sequence[torch.Tensor] | Dict[str,
            torch.Tensor]): The input tensor, or tensor sequence, or pairs
            of input names and tensors.
    Return:
        outputs (torch.Tensor | Sequence[torch.Tensor] | Dict[str,
            torch.Tensor]): The input tensor, or tensor sequence, or pairs
            of input names and tensors.
    """
    is_dict_inputs = isinstance(inputs, Dict)
    if is_dict_inputs:
        # inputs to dict
        assert self._input_names is not None, \
            'input names have not been given.'
        inputs = [inputs[input_name] for input_name in self._input_names]
    elif isinstance(inputs, torch.Tensor):
        inputs = [inputs]
    outputs = self.__torchscript_execute(inputs)
    if self._output_names is not None and is_dict_inputs:
        # output to dict
        if isinstance(outputs, torch.Tensor):
            outputs = [outputs]
        outputs = dict(zip(self._output_names, outputs))
    if isinstance(outputs, tuple) and self._output_names is not None:
        assert len(outputs) == len(self._output_names)
        outputs = dict(zip(self._output_names, outputs))
    return outputs