wenxinxu / resnet-in-tensorflow

Re-implement Kaiming He's deep residual networks in tensorflow. Can be trained with cifar10.
MIT License
828 stars 276 forks source link

add the test.py file #33

Open Xiaokeai18 opened 5 years ago

Xiaokeai18 commented 5 years ago

Previously, when developer attempted to run the test process, they should Notes(#) some lines of code and add the code test_image_array = ... # Better to be whitened in advance. Shape = [-1, img_height, img_width, img_depth] predictions = train.test(test_image_array) as mentioned in README.md.
It might be trouble to do these. Thus, I add the test file named cifar10_test.py , with it, they can easily run the test prosess, just type in the script python cifar10_test.py. Afterwards, the prediction accuracy will be printed on the terminal, and a file named 'pridict_ret.txt' will be generated which contains the prediction log of the test process. Based on my expariments, this cifar10_test.py works pretty well as shown below. image