File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
samples/python/inception_v3 Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3838if not MODEL_NAME in str (execution_ws ):
3939 execution_ws = execution_ws / MODEL_NAME
4040
41- model_dir = execution_ws / "models"
42- model_path = model_dir / "{} .bin". format ( MODEL_NAME )
43- imagenet_classes_path = model_dir / IMAGENET_CLASSES_FILE
41+ model_dir = os . path . join ( execution_ws , "models" )
42+ model_path = os . path . join ( model_dir , MODEL_NAME + " .bin" )
43+ imagenet_classes_path = os . path . join ( model_dir , IMAGENET_CLASSES_FILE )
4444
4545####################################################################
4646
@@ -131,6 +131,7 @@ def Inference(input_image_path):
131131
132132 # show the Top 5 predictions for image
133133 output = torch .from_numpy (output_data )
134+ output = output .squeeze (0 )
134135 probabilities = torch .softmax (output , dim = 0 )
135136 result = post_process (probabilities , output )
136137
Original file line number Diff line number Diff line change 1818#include < algorithm>
1919#include < execution>
2020#include < vector>
21-
21+ # include < fstream >
2222
2323#include " BuildId.hpp"
2424#include " DynamicLoadUtil.hpp"
You can’t perform that action at this time.
0 commit comments