qibao77 / LFFN

Tensorflow code for our paper "Lightweight Feature Fusion Network for Single Image Super-Resolution" (SPL2019)
16 stars 4 forks source link

The cost time #1

Open mygmyg opened 5 years ago

mygmyg commented 5 years ago

the cost time is 0.0187s using LFFN-S x2 in your paper, but i use 360x640 imgae as low resolution input for test on 2080Ti , the cost time is 0.086s .

is there something wrong with my test?

    def test_time(self):

        lr_imgs=np.random.rand(1,360,640,3)

        y = self.sess.run(self.y_, feed_dict={self.x: lr_imgs,
                                                      self.is_training: 0})
        start_time=time.time()
        for _ in range(100):
            y = self.sess.run(self.y_, feed_dict={self.x: lr_imgs,
                                                      self.is_training: 0})
            print(np.shape(y))

        duration=time.time()-start_time
        print("duration:",duration)
qibao77 commented 5 years ago

Thank you for your attention to our work. 1) Your cost time seems to consist of 100 tests. 2) In our paper, the speed is evaluated with the average inference time for upscaling x4 on Set5. 3) On the other hand, we find that the average inference time is also affected by the operating environment, such as IDE and CPU.