Api
ModelOutput = TypeVar('ModelOutput', Tensor, list[Tensor], tuple[Tensor], dict[str, Tensor], covariant=True)
module-attribute
A Model's forward pass may produce a tensor, multiple tensors, or named tensors.
BionemoModelConfig
Bases: Generic[ModelType]
, ABC
An abstract class for model configuration.
Source code in bionemo/core/model/config.py
54 55 56 57 58 59 60 |
|
configure_model(*args, **kwargs)
abstractmethod
Configures the model.
Source code in bionemo/core/model/config.py
57 58 59 60 |
|
BionemoTrainableModelConfig
Bases: Generic[ModelType, LossType]
, BionemoModelConfig[ModelType]
An abstract class for trainable model configuration.
Source code in bionemo/core/model/config.py
63 64 65 66 67 68 69 |
|
get_loss_reduction_class()
abstractmethod
Returns the loss reduction class.
Source code in bionemo/core/model/config.py
66 67 68 69 |
|
Model
Bases: Protocol[ModelOutput]
Lightweight interface for a model: must have a forward method.
Source code in bionemo/core/model/config.py
41 42 43 44 45 46 |
|
forward(*args, **kwargs)
Prediction / forward-step for a model.
Source code in bionemo/core/model/config.py
44 45 46 |
|