(x)
| 98 | |
| 99 | # Can specify which variable in ckpt to restore to which variable. |
| 100 | def map_func(x): |
| 101 | return {'v3': 'ckpt/v1', 'v4': 'ckpt/v2'}.get(x, x) |
| 102 | with _saver.restore_variables_on_create(ckpt_prefix, map_func): |
| 103 | v3 = resource_variable_ops.ResourceVariable(2.0, name='v3') |
| 104 | v4 = resource_variable_ops.ResourceVariable(2.0, name='v4') |