The example code predicts the class label of input image by using VGG19 network
You should download pre-trained VGG19 weight vgg19.npy
- If you want to use tf.data API, pipe_lining option to True
- If you want to read data with main memory, in_memory option to True
- If you want to read data without main memory (on disk), in_memory option to False
I measured the average time for predicting class label.
GPU : Nvidia Tesla K80
CPU : Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz
Batch size : 32
With tf.data API | w.o tf.data API(using feed_dict) | |
---|---|---|
in_memory | 0.3459s/batch | 0.3410s/batch |
disk based | 1.4656s/batch | 4.0910s/batch |
If you have any questions or comments on my codes, please email to me. [email protected]