predictors¶
-
class
transfer_nlp.plugins.predictors.
PredictorABC
(vectorizer: transfer_nlp.loaders.vectorizers.Vectorizer, model: torch.nn.Module)[source]¶ -
decode
(*args, **kwargs) → List[Dict][source]¶ Return an output dictionary for every example in the batch :param args: :param kwargs: :return:
-
json_to_data
(input_json: Dict) → Dict[source]¶ Transform a json entry into a data example, which is the same that what the __getitem__ method in the data loader, except that this does not output any expected label as in supervised setting :param input_json: :return:
-
json_to_json
(input_json: Dict) → Dict[str, Any][source]¶ Full prediction: input_json –> data example –> predictions –> json output :param input_json: :return:
-