Skip to content

Conversation

@typhoonzero
Copy link
Contributor

Fix #5452

@typhoonzero typhoonzero requested a review from reyoung November 8, 2017 05:04

#include <thrust/execution_policy.h>
#include <thrust/reduce.h>
#include <iostream>
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this line.

size_t infer_width = inference->dims()[1];
cudaMemset((void**)&accuracy_data, 0, sizeof(float));
cudaError_t e = cudaMemset(accuracy_data, 0, sizeof(float));
PADDLE_ENFORCE_EQ(0, e, "cudaMemset error");
Copy link
Contributor

Choose a reason for hiding this comment

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

PADDLE_ENFORCE(e);

Copy link
Contributor

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

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

LGTM.

@typhoonzero typhoonzero merged commit 502d7da into PaddlePaddle:develop Nov 8, 2017
@typhoonzero typhoonzero deleted the fix_accuracy_cudamemset branch December 22, 2017 05:43
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