JiahuiYu / generative_inpainting

DeepFill v1/v2 with Contextual Attention and Gated Convolution, CVPR 2018, and ICCV 2019 Oral
http://jiahuiyu.com/deepfill/
Other
3.27k stars 787 forks source link

Question about network speed #468

Closed yh675 closed 3 years ago

yh675 commented 4 years ago

Hi,

Thanks for sharing your work!

I am trying out the network and according to the paper the average time per 512x512 image is 0.2s.

I am running the network on a 1080Ti gpu, with CUDA version 10.0.130 and cudNN 7.6.5 and the time per places2 image in the examples/places2 folder is 4+ seconds just for the line:

result = sess.run(output) in test.py (line 62).

I tried to crop the image to 512x512 and the time is still 4+ seconds.

Would you have any suggestions on what the reason for this might be? Does it have something to do with the library versions?

StillSpeedo commented 4 years ago

First run usually takes longer due to cuDNN autotune. In my case ~10 sec for first batch and 0.27 sec in average for next batches (512*512 input images). Test.py script performs model load and cuDNN autotune each time.

JiahuiYu commented 3 years ago

@yh675 For serving, I think you also counted the model loading and GPU warmup time? As @StillSpeedo said, for serving cost we measure time once models are loaded and GPUs are warmed up.