代码地址:
https://github.com/lxtGH/OctaveConv_pytorch
256*256 resnet50的速度原来是17ms,新的52ms
下面这个需要33ms
if __name__ == '__main__':
model = DataSetAwareResnet50().cuda()
import time
for i in range(10):
img = torch.Tensor(1, 3, 256, 256).cuda()
with torch.no_grad():
torch.cuda.synchronize()
start = time.time()
out = model(img)
torch.cuda.synchronize()
print('time.{}'.format(time.time() - start))
resnet34本机需要33ms
代码: