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

Please give a exact example for test #8

Open wonny2001 opened 7 years ago

wonny2001 commented 7 years ago

example below is not enough. please give a exact example for test code

Test

The test() function in the class Train() help you predict. It returns the softmax probability with shape [num_test_images, num_labels]. You need to prepare and pre-process your test data and pass it to the function. You may either use your own checkpoints or the pre-trained ResNet-110 checkpoint I uploaded. You may wrote the following lines at the end of cifar10_train.py file train = Train() test_image_array = ... # Better to be whitened in advance. Shape = [-1, img_height, img_width, img_depth] top1_error, loss = train.test(test_image_array)

Run the following commands in the command line:

If you want to use my checkpoint.

python cifar10_train.py --test_ckpt_path='model_110.ckpt-79999'

XmaNm commented 7 years ago

how to test?please list detailed codes.thank you