def METHOD_NAME(
    self,
    inputs: Union[
        Dict[str, torch.Tensor], Dict[str, np.ndarray], Tuple[Dict[str, torch.Tensor], Dict[str, torch.Tensor]]
    ],
):
    # Convert inputs to tensors.
    for input_feature_name, input_values in inputs.items():
        if not isinstance(input_values, torch.Tensor):
            inputs[input_feature_name] = torch.from_numpy(input_values)
        else:
            inputs[input_feature_name] = input_values
    encoder_outputs = {}
    for input_feature_name, input_values in inputs.items():
        encoder = self.input_features.get(input_feature_name)
        encoder_output = encoder(input_values)
        encoder_outputs[input_feature_name] = encoder_output
    return encoder_outputs