I am having the same issue with state_dict saved using older versions of Pytorch. To avoid changing some legacy code, would it still be fine if I didn’t make the change you suggested and ignored the warning ?