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

ParamAttr的参数learning_rate取值非1时,paddle是否会为learning_rate创建一个变量,如何给这个变量指定名字? #64351

Open
spantarXP opened this issue May 16, 2024 · 1 comment
Assignees
Labels

Comments

@spantarXP
Copy link

请提出你的问题 Please ask your question

在正常能运行的paddle环境下(该环境下,所有参数的ParamAttr设置的learning_rate=1.0),需要对不同的参数设置不同的学习率,所以通过调整ParamAttr实现这一目标,发现只要将ParamAttr的learning_rate设置成非1的值,就会报错:
image
从报错怀疑paddle给非1.0的learning_rate生成了一个variable 且命名为tmp_1,与之前重复,造成失败。

想知道paddle 对ParamAttr的参数learning_rate的处理是怎样的,怎么指定变量名?

@zyfncg
Copy link
Contributor

zyfncg commented May 16, 2024

image 从develop分支的源码找到了对应的逻辑,看上去tmp_1是global learning rate和参数learning rate乘积对应的Tensor,命名重复估计是这里创建变量名的规则有些问题。

从代码路径看使用的paddle版本不是最新的,可以试试用最新paddle版本看能否运行

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

No branches or pull requests

2 participants