Actually my motive is to measure the time it takes for the model to transfer to the GPU from the CPU and then inferencing. So basically pre_trained.cpu() is done to ensure that it comes to cpu every time before it is transferred to the GPU since that transfer time i have to measure. Yeaa img_variable is .cuda()