(self, sess)
| 176 | pass |
| 177 | |
| 178 | def _run_init(self, sess): |
| 179 | logger.info( |
| 180 | "Restoring checkpoint from {} ...".format(self.path)) |
| 181 | |
| 182 | matched_pairs = [] |
| 183 | |
| 184 | def f(reader, name, v): |
| 185 | val = reader.get_tensor(name) |
| 186 | val = SessionUpdate.relaxed_value_for_var(val, v, ignore_mismatch=True) |
| 187 | if val is not None: |
| 188 | matched_pairs.append((v, val)) |
| 189 | |
| 190 | with sess.as_default(): |
| 191 | self._match_vars(f) |
| 192 | upd = SessionUpdate(sess, [x[0] for x in matched_pairs]) |
| 193 | upd.update({x[0].name: x[1] for x in matched_pairs}) |
| 194 | |
| 195 | |
| 196 | class DictRestore(SessionInit): |
nothing calls this directly
no test coverage detected