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

Support that the dtype of ValueTensor and Attr(dtype) are different #24961

Closed
wants to merge 1 commit into from

Conversation

liym27
Copy link
Contributor

@liym27 liym27 commented Jun 8, 2020

PR types

New features

PR changes

OPs

Describe

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 8, 2020

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 8, 2020

❌This PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

value = static_cast<T>(tensor_data[0]);
} else {
const auto *tensor_data =
cpu_tensor ? cpu_tensor->data<T>() : value_tensor->data<T>();
Copy link
Contributor

@wangchaochaohu wangchaochaohu Jun 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以考虑改写下 比如tesor_data 在外面声明 然后 最后value 统一赋值?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的精度损失问题?

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

Successfully merging this pull request may close these issues.

2 participants