It currently takes approximately 8-9 seconds to execute the following code:
        device = torch.device("cuda:0")
        self.model = self.model.to(device)
        self.model.load_state_dict(torch.load(self.validate_model))
        for parameter in self.model.parameters():
            parameter.requires_grad = False

The actual inference time is only 3 seconds, where the model segments a structure on 74 2d images of size 512x512.
Is there any way to speed up the model loading on the GPU?