预测速度很不正常
Created by: Fauny
在aistudio上使用自制数据训练 ResNet50_vd 模型,转换为reference模型后测试
python tools/predict.py \
-m ./model/ResNet50_vd/model \
-p ./model/ResNet50_vd/params \
-i ./test/1.png \
--use_gpu=False \
--use_tensorrt=False \
--model_name=ResNet50_vd
CPU:
2020-09-23 11:35:14,858-INFO: preprocess use time: 4.0798187255859375
2020-09-23 11:35:15,075-INFO: total use time: 221.3459014892578
2020-09-23 11:35:15,075-INFO: class: 2
2020-09-23 11:35:15,075-INFO: score: 0.9998900890350342
GPU:
2020-09-23 11:30:16,196-INFO: preprocess use time: 4.707574844360352
2020-09-23 11:30:18,009-INFO: total use time: 1818.0217742919922
2020-09-23 11:30:18,009-INFO: class: 2
2020-09-23 11:30:18,009-INFO: score: 0.9998900890350342
- 为啥GPU比CPU慢,而且慢的出奇
- 必须用tensorrt才能提高速度吗?
- windows上tensorrt效果如何,有没测试