capreolus.trainer
¶
Package Contents¶
Classes¶
Trainer |
Base class for Trainer modules. The purpose of a Trainer is to train a Reranker module and use it to make predictions. Capreolus provides two trainers: PytorchTrainer and TensorFlowTrainer |
-
class
capreolus.trainer.
Trainer
(config=None, provide=None, share_dependency_objects=False, build=True)[source]¶ Bases:
capreolus.ModuleBase
Base class for Trainer modules. The purpose of a Trainer is to train a
Reranker
module and use it to make predictions. Capreolus provides two trainers:PytorchTrainer
andTensorFlowTrainer
- Modules should provide:
- a
train
method that trains a reranker on training and dev (validation) data - a
predict
method that uses a reranker to make predictions on data
- a