Skip to content

Commit fdbca49

Browse files
unbound output
1 parent e7d8c88 commit fdbca49

File tree

1 file changed

+4
-8
lines changed
  • Samples/BatchSupport/BatchSupport

1 file changed

+4
-8
lines changed

Samples/BatchSupport/BatchSupport/main.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,6 @@ int main(int argc, char *argv[]) {
6363
binding.Bind(inputFeatureDescriptor.Current().Name(), inputVideoFrames);
6464
}
6565

66-
// bind output tensor
67-
auto outputShape = std::vector<int64_t>{BATCH_SIZE, 1000, 1, 1};
68-
auto outputValue = TensorFloat::Create(outputShape);
69-
std::wstring outputDataBindingName =
70-
std::wstring(model.OutputFeatures().First().Current().Name());
71-
binding.Bind(outputDataBindingName, outputValue);
72-
7366
// now run the model
7467
printf("Running the model...\n");
7568
DWORD ticks = GetTickCount();
@@ -78,7 +71,10 @@ int main(int argc, char *argv[]) {
7871
printf("model run took %d ticks\n", ticks);
7972

8073
// Print Results
81-
SampleHelper::PrintResults(outputValue.GetAsVectorView());
74+
auto outputs = results.Outputs().Lookup(L"softmaxout_1").as<TensorFloat>();
75+
auto outputShape = outputs.Shape();
76+
printf("output dimensions [%d, %d, %d, %d]\n", outputShape.GetAt(0), outputShape.GetAt(1), outputShape.GetAt(2), outputShape.GetAt(3));
77+
SampleHelper::PrintResults(outputs.GetAsVectorView());
8278
}
8379

8480
bool ParseArgs(int argc, char *argv[]) {

0 commit comments

Comments
 (0)