Model inference very slow when batch_size changes for the first time

That’s a feasible solution, although not so elegent. I am wandering, is it possible to mannually set convolution algrithm in cudnn?