Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_action and deicde_action #21

Open
jiadd opened this issue Nov 5, 2018 · 4 comments
Open

get_action and deicde_action #21

jiadd opened this issue Nov 5, 2018 · 4 comments

Comments

@jiadd
Copy link

jiadd commented Nov 5, 2018

您好,
请教一下rlmodel.py中的 get_action 和 deicde_action 有什么区别与联系呢,用这两个函数的作用分别是什么呢?谢谢!

@xuyanfu
Copy link
Owner

xuyanfu commented Nov 6, 2018

get_action是根据概率采样。deicde_action是贪心的选择概率较大的。

@jiadd
Copy link
Author

jiadd commented Nov 13, 2018

明白了非常感谢!
还有一个问题想请教,您的代码rlmodel.py中entity_embedding = tf.get_variable(name = 'entity_embedding',initializer=entity_ebd,trainable=False),如果我想让entity_embedding参与训练即trainable=True,该怎么修改代码呢?现在计算梯度时报如下错误:
gradBuffer[index] += grad(rlmodel.py 282行)
ValueError: could not broadcast input array from shape (2,50) into shape (2)
谢谢!

@xuyanfu
Copy link
Owner

xuyanfu commented Nov 13, 2018

不好意思,最近已经很久没有看过这个项目的代码了,抱歉帮不上什么忙。

@zxs1995
Copy link

zxs1995 commented Oct 2, 2019

您好,请问下您为什么要有两种action呢,麻烦解答了~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants