Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix the problem in printing feature in c++ API examples : feature_extract #15686

Merged
merged 5 commits into from
Nov 26, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp-package/example/feature_extract/feature_extract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class FeatureExtractor {
/*print out the features*/
auto array = executor->outputs[0].Copy(Context(kCPU, 0));
NDArray::WaitAll();
array = array.Reshape({2, 1024});
somone23412 marked this conversation as resolved.
Show resolved Hide resolved
for (int i = 0; i < 1024; ++i) {
cout << array.At(0, i) << ",";
}
Expand Down