optimum/graphcore/trainer.py
def _prepare_inputs(self, inputs: Dict[str, Union[torch.Tensor, Any]]) -> Dict[str, Union[torch.Tensor, Any]]:
        """
        Prepare :obj:`inputs` before feeding them to the model, converting them to tensors if they are not already and
        handling potential state.
        """
        inputs = self._prepare_input(inputs)
        if self.args.past_index >= 0 and self._past is not None:
            inputs["mems"] = self._past

        return inputs

        Prepare :obj:`inputs` before feeding them to the model, converting them to tensors if they are not already and
        handling potential state.
        
Prepare :obj:`inputs` before feeding them to the model, converting them to tensors if they are not already and
handling potential state.
Prepare : obj : ` inputs ` before feeding them to the model converting them to tensors if they are not already and handling potential state .
def _prepare_inputs(self, inputs: Dict[str, Union[torch.Tensor, Any]]) -> Dict[str, Union[torch.Tensor, Any]]:
        inputs = self._prepare_input(inputs)
        if self.args.past_index >= 0 and self._past is not None:
            inputs["mems"] = self._past
        return inputs
def _prepare_inputs ( self , inputs : Dict [ str , Union [ torch . Tensor , Any ] ] ) -> Dict [ str , Union [ torch . Tensor , Any ] ] : inputs = self . _prepare_input ( inputs ) if self . args . past_index >= 0 and self . _past is not None : inputs [ "mems" ] = self . _past return inputs
Prepare :obj:`inputs` before feeding them to the model, converting them to tensors if they are not already and
handling potential state.
Prepare : obj : ` inputs ` before feeding them to the model converting them to tensors if they are not already and handling potential state .
"""
        Prepare :obj:`inputs` before feeding them to the model, converting them to tensors if they are not already and
        handling potential state.
        """
self
inputs
Dict[str, Union[torch.Tensor, Any]]