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

Fix Tensor.grad setter bug #5462

Merged
merged 14 commits into from Jul 12, 2021
Merged

Fix Tensor.grad setter bug #5462

merged 14 commits into from Jul 12, 2021

Conversation

wyg1997
Copy link
Contributor

@wyg1997 wyg1997 commented Jul 12, 2021

set的Tensor可能是其它Op的计算结果,是一个 oneflow_internal.Tensor 对象,这里就会有问题了。例如:

a.grad = a.grad * 2

第二个bug是Parameter构造函数中如果用 oneflow_internal.Tensor 构造,其它地方就会报错。

@wyg1997 wyg1997 requested a review from tea321000 July 12, 2021 08:11
@oneflow-ci-bot oneflow-ci-bot self-requested a review July 12, 2021 11:54
@wyg1997 wyg1997 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 12, 2021 12:53
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 12, 2021 13:14
@oneflow-ci-bot oneflow-ci-bot merged commit 6e8c8cf into master Jul 12, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the fix-internal_tensor_bugs branch July 12, 2021 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants