Closed rafaelgm closed 1 year ago
When using mixed precision and trying to save weights every N steps I was getting this error after the first save step:
RuntimeError: Input type (struct c10::Half) and bias type (float) should be the same
Adding keep_fp32_wrapper=True to the two unwrap_model calls on save_weights seems to fix the issue.
When using mixed precision and trying to save weights every N steps I was getting this error after the first save step:
RuntimeError: Input type (struct c10::Half) and bias type (float) should be the same
Adding keep_fp32_wrapper=True to the two unwrap_model calls on save_weights seems to fix the issue.