Trainer.predict using customized model.predict function?
I am using the [Trainer](https://huggingface.co/transformers/main_classes/trainer.html) to train a sentence-bert model with triplet-loss. Then I want to do some inference. How to call Trainer.predict using custom model.predict function?

I use `model.forward()` to calculate loss in training stage. But I want to use a customized `model.predict()` to calculate prediction results based on `model.forward()` (e.g., model.forward() -> embedding -> other method to calculate prediction instead of the loss function)

I saw the `prediction_step()` function just called `outputs = model(**inputs)` to get `(loss, logits, labels)`

Is there any good method to do that?
Cant you just subclass the Trainer class and write your own `predict`?<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.