diff --git a/retraining-example.py b/retraining-example.py index 6ca1dd1..9d084ce 100644 --- a/retraining-example.py +++ b/retraining-example.py @@ -70,9 +70,9 @@ def run_inference_on_image(): predictions = np.squeeze(predictions) top_k = predictions.argsort()[-5:][::-1] # Getting top 5 predictions - f = open(labelsFullPath, 'rb') + f = open(labelsFullPath, 'r') lines = f.readlines() - labels = [str(w).replace("\n", "") for w in lines] + labels = [w.replace("\n", "") for w in lines] for node_id in top_k: human_string = labels[node_id] score = predictions[node_id]