Skip to content

dongheehand/reading-data-tf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example code to measure the performance of tf.data API

The example code predicts the class label of input image by using VGG19 network

For experiments

You should download pre-trained VGG19 weight vgg19.npy

  1. If you want to use tf.data API, pipe_lining option to True
  2. If you want to read data with main memory, in_memory option to True
  3. If you want to read data without main memory (on disk), in_memory option to False

Experimental Results

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

Comments

If you have any questions or comments on my codes, please email to me. [email protected]

About

Performance measurement of using tf.data API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages