如何在tf_agents中编写自定义策略
我想在TF_AGENTS中使用上下文强盗代理(线性刺激采样剂)。
我正在使用自定义环境,奖励延迟了3天。因此,用于训练,观察结果是从保存的历史表(3天前产生的预测)及其相应的奖励(也在表中)产生的。
鉴于此,只有在培训期间,我如何制定从历史表中输出一个给定观察的行动的政策?在评估期间,我希望该政策以通常的方式行事,并使用从中学到的政策产生行动。
看来我需要编写一种自定义策略,在训练过程中以某种方式行事,并且在评估过程中表现为通常的自我(线性刺激)。不幸的是,我找不到本用户酶的任何示例或文档。有人可以解释一下如何编码吗?一个例子将非常有用
I wanted to use the contextual bandit agents (LinearThompson Sampling agent) in the tf_Agents.
I am using a custom environment and my rewards are delayed by 3 days. Hence for training, the observations are generated from the saved historical tables (predictions generated 3 days ago) and their corresponding rewards (Also in the table).
Given this, only during training, how do I make the policy to output an action, for a given observation, from the historical tables? And during evaluation I want the policy to behave the usual way, generating the actions using the policy it learned from.
Looks like I need to write a custom policy, that behaves in a way during training and behaves it's usual self (linearthompsonsampling.policy) during evaluation. Unfortunately I couldn't find any examples or documentation for this usecase. Can someone please explain how to code this - an example would be very useful
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论