I had the same problem. I was using DataParallel(), and loading the model in eval() mode does not work.
@el_samou_samou, could you elaborate more on weight_mat = weight_mat.contiguous().view(height, -1)? I don’t think I had problem with that.