def __call__(self, texts: List[np.ndarray], *args) -> Union[List[List[float]], List[int]]:
        """Infer on the given data.

        Args:
            texts: list of tokenized text samples
            labels: labels
            *args: additional arguments

        Returns:
            for each sentence:
                vector of probabilities to belong with each class
                or list of labels sentence belongs with
        """
        with torch.no_grad():
            features = np.array(texts)
            inputs = torch.from_numpy(features)
            inputs = inputs.to(self.device)
            outputs = self.model(inputs)
            if self.multilabel:
                outputs = torch.nn.functional.sigmoid(outputs)
            else:
                outputs = torch.nn.functional.softmax(outputs, dim=-1)

        outputs = outputs.cpu().detach().numpy()
        if self.return_probas:
            return outputs.tolist()
        else:
            return np.argmax(outputs, axis=-1).tolist()
Infer on the given data.

        Args:
            texts: list of tokenized text samples
            labels: labels
            *args: additional arguments

        Returns:
            for each sentence:
                vector of probabilities to belong with each class
                or list of labels sentence belongs with
        
deeppavlov/models/classifiers/torch_classification_model.py