Restores part of the model from other directory. Useful to initialize part of the model with another pretrained model. Args: other_model_dir: Model directory to load from. remap: dict, remapping current parameters to the other model's.
(self, other_model_dir, remap)
| 133 | keep_every_n=self._keep_every_n) |
| 134 | |
| 135 | def restore_part(self, other_model_dir, remap): |
| 136 | """Restores part of the model from other directory. |
| 137 | |
| 138 | Useful to initialize part of the model with another pretrained model. |
| 139 | |
| 140 | Args: |
| 141 | other_model_dir: Model directory to load from. |
| 142 | remap: dict, remapping current parameters to the other model's. |
| 143 | """ |
| 144 | load_and_map_checkpoint(self._items["model"], other_model_dir, remap) |
nothing calls this directly
no test coverage detected