(model, checkpoint_path, strict=True)
| 80 | |
| 81 | |
| 82 | def load_checkpoint(model, checkpoint_path, strict=True): |
| 83 | state_dict = load_state_dict(checkpoint_path) |
| 84 | resize_pos_embed(state_dict, model) |
| 85 | incompatible_keys = model.load_state_dict(state_dict, strict=strict) |
| 86 | return incompatible_keys |
| 87 | |
| 88 | |
| 89 | def create_model( |
no test coverage detected