MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / map_func

Method map_func

tensorflow/contrib/eager/python/saver_test.py:100–101  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

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')

Callers 1

_custom_getterFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected