@ptrblck thanks for the reply. Now, I have found out exactly where this issue occurs. I have edited the original question now. Please provide your thoughts on what would be a solution. For loading the model I use torch.load to load the state_dict model file and get the model structure information from model.py