Skip to content

Commit

Permalink
[EXAMPLE][BUG] fix cls id error
Browse files Browse the repository at this point in the history
  • Loading branch information
seanxcwang committed Oct 20, 2020
1 parent e77d508 commit ac4875a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/base/image_classifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Status ImageClassifier::ProcessSDKOutput(std::shared_ptr<TNNSDKOutput> output_)
RETURN_VALUE_ON_NEQ(!output_mat_scores, false,
Status(TNNERR_PARAM_ERR, "output_mat_scores is invalid"));

int class_id = -1;
int class_id = 0;
float *scores_data = (float *)output_mat_scores.get()->GetData();
float max_v = scores_data[0];
for (int i = 1; i < output_mat_scores->GetChannel(); ++i) {
Expand Down

0 comments on commit ac4875a

Please sign in to comment.