快捷方式

torchrl.trainers.algorithms.configs.modules.ValueModelConfig

class torchrl.trainers.algorithms.configs.modules.ValueModelConfig(_partial_: bool = False, in_keys: Optional[Any] = None, out_keys: Optional[Any] = None, _target_: str = 'torchrl.trainers.algorithms.configs.modules._make_value_model', network: NetworkConfig = '???')[來源]

用於配置 Value 模型的類。

示例

>>> cfg = ValueModelConfig(network=MLPConfig(in_features=10, out_features=5, depth=2, num_cells=32))
>>> net = instantiate(cfg)
>>> y = net(torch.randn(1, 10))
>>> assert y.shape == (1, 5)

另請參閱

torchrl.modules.ValueOperator

文件

訪問全面的 PyTorch 開發者文件

檢視文件

教程

為初學者和高階開發者提供深入的教程

檢視教程

資源

查詢開發資源並讓您的問題得到解答

檢視資源