Skip to content

Commit d5463e0

Browse files
committed
Change to calculate speedup when data size is 2
Signed-off-by: syeo <[email protected]>
1 parent b448b90 commit d5463e0

File tree

1 file changed

+2
-2
lines changed
  • AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_Enabling_Auto_Mixed_Precision_for_TransferLearning/scripts

1 file changed

+2
-2
lines changed

AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_Enabling_Auto_Mixed_Precision_for_TransferLearning/scripts/plot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
throughput = line.split(': ')[1]
99
throughput_list.append(float(throughput))
1010

11-
if len(throughput_list) >= 2:
11+
if len(throughput_list) == 2:
1212
speedup = float(throughput_list[1])/float(throughput_list[0])
1313
print("Speedup : ", speedup)
1414
df = pd.DataFrame({'pretrained_model':['saved model', 'optimized model'], 'Speedup':[1, speedup]})
1515
ax = df.plot.bar( x='pretrained_model', y='Speedup', rot=0)
1616
else:
17-
print("Insufficient data to calculate speedup")
17+
print("Incorrect data size to calculate speedup")

0 commit comments

Comments
 (0)