-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_predict_script.sh
More file actions
17 lines (17 loc) · 946 Bytes
/
test_predict_script.sh
File metadata and controls
17 lines (17 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Basic tests for predict.py script
# show program help
python predict.py -h
# basic usage
python predict.py flower_data/test/99/image_07854.jpg densenet_e20.pth
# check if change in number of top k is working
python predict.py flower_data/test/99/image_07854.jpg densenet_e20.pth --top_k 3
# check if label mapping is working properly
python predict.py flower_data/test/99/image_07854.jpg densenet_e20.pth --category_names cat_to_name.json
# check if predicting on gpu works
python predict.py flower_data/test/99/image_07854.jpg densenet_e20.pth --gpu
# check case for error in image file path
python predict.py flower_data/test/99/some_image.jpg densenet_e20.pth
# check case for error in model file path
python predict.py flower_data/test/99/image_07854.jpg googlenet_e20.pth
# check case for error in cat to name JSON file path
python predict.py flower_data/test/99/image_07854.jpg densenet_e20.pth --category_names my_own_cat_to_name.json