-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
refine square_error_cost layer #5216
Conversation
@@ -295,15 +295,16 @@ def find_actual(target_name, fetch_list): | |||
+ ") has different lod at " + str(place)) | |||
else: | |||
idx = find_actual(out_name, fetch_list) | |||
actual_t = outs[idx] | |||
actual = outs[idx] | |||
actual_t = np.array(actual) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because type of outs[idx] is LoDTensor, not numpy array. We should convert it to numpy array before comparing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for looking into this issue.
No description provided.