我有一个基本的自定义模型,它本质上只是默认 RLLib 全连接模型的复制粘贴(https://github.com/ray-project/ray/blob/master/rllib/models/tf/fcnet.py)我正在通过带有"custom_model_config": {}
字典的配置文件传递自定义模型参数。此配置文件如下所示:
# Custom RLLib model
custom_model: test_model
# Custom options
custom_model_config:
## Default fully connected network settings
# Nonlinearity for fully connected net (tanh, relu)
"fcnet_activation": "tanh"
# Number of hidden layers for fully connected net
"fcnet_hiddens": [256, 256]
# For DiagGaussian action distributions, make the second half of the model
# outputs floating bias variables instead of state-dependent. This only
# has an effect is using the default fully connected net.
"free_log_std": False
# Whether to skip the final linear layer used to resize the hidden layer
# outputs to size `num_outputs`. If True, then the last hidden layer
# should already match num_outputs.
"no_final_linear": False
# Whether layers should be shared for the value function.
"vf_share_layers": True
## Additional settings
# L2 regularization value for fully connected layers
"l2_reg_value": 0.1
当我使用这个设置开始训练过程时,RLLib 给了我以下警告:
自定义 ModelV2 应该接受所有自定义选项作为 **kwargs,而不是在 config['custom_model_config'] 中期望它们!
我了解 **kwargs 的作用,但我不确定如何使用自定义 RLLib 模型来实现它以修复此警告。有任何想法吗?