Api
ModelOutput = TypeVar('ModelOutput', Tensor, list[Tensor], tuple[Tensor], dict[str, Tensor], covariant=True)
module-attribute
模型的正向传递可能会生成张量、多个张量或命名张量。
BionemoModelConfig
基类:Generic[ModelType]
, ABC
模型配置的抽象类。
源代码位于 bionemo/core/model/config.py
54 55 56 57 58 59 60 |
|
configure_model(*args, **kwargs)
abstractmethod
配置模型。
源代码位于 bionemo/core/model/config.py
57 58 59 60 |
|
BionemoTrainableModelConfig
基类:Generic[ModelType, LossType]
, BionemoModelConfig[ModelType]
可训练模型配置的抽象类。
源代码位于 bionemo/core/model/config.py
63 64 65 66 67 68 69 |
|
get_loss_reduction_class()
abstractmethod
返回损失缩减类。
源代码位于 bionemo/core/model/config.py
66 67 68 69 |
|
Model
基类:Protocol[ModelOutput]
模型的轻量级接口:必须具有 forward 方法。
源代码位于 bionemo/core/model/config.py
41 42 43 44 45 46 |
|
forward(*args, **kwargs)
模型的预测/前向步骤。
源代码位于 bionemo/core/model/config.py
44 45 46 |
|