0

Basically, I am testing the difference speed of Conv2D and QuantizedConv2D. I found that if I use two constant nodes as input and filter, the QuantizedConv2D is faster than Conv2D; but if I use a placeholder node as input, and a constant node as a filter, the QuantizedConv2D is much slower than Conv2D.

I use "tf.Session.run" method to feed data to the placeholder.

My environment is:

tensorflow-1.3(only CPU), compile with source code, python2.7; (and when compiling tensorflow, I use -msse4.1)

I use python time module to test the cost time

a=time.time();
for i in range(NUM):
  c=sess.run([output], feed_dict={data: np_list});
b=time.time();
costime = (b-a)/NUM;

Can anybody share the reason?

Vic
  • 1
  • 2
  • How are you measuring the time for the op? Could you provide a repro example? – suharshs Jan 05 '18 at 21:26
  • I build a 3 conv op graph, and use python time module. a=time.time(); c=sess.run([output], feed_dict={d: np_l}); b=time.time(); costime=b-a; Did I use the wrong method? I 've been stuck with the problem for several days, I am appreciated that if you could give me some suggestions. Thank you – Vic Jan 06 '18 at 02:54

0 Answers0