Commit 72fef38
committed
Fix pt model loading with non-matching state dictionaries (init from
tf2pt model)
- Add try-catch block for loading frozen models
- Use strict=False when state_dict keys don't match
- Log warnings for model state_dict mismatches
- Prevent crashes when loading models with different architectures"1 parent 0f53edc commit 72fef38
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
616 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
617 | 625 | | |
618 | 626 | | |
619 | 627 | | |
| |||
0 commit comments