MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / _read_checkpoint_vars

Method _read_checkpoint_vars

tensorpack/tfutils/sessinit.py:118–123  ·  view source on GitHub ↗

return a set of strings

(model_path)

Source from the content-addressed store, hash-verified

116
117 @staticmethod
118 def _read_checkpoint_vars(model_path):
119 """ return a set of strings """
120 reader = tf.train.NewCheckpointReader(model_path)
121 reader = CheckpointReaderAdapter(reader) # use an adapter to standardize the name
122 ckpt_vars = reader.get_variable_to_shape_map().keys()
123 return reader, set(ckpt_vars)
124
125 def _match_vars(self, func):
126 reader, chkpt_vars = SaverRestore._read_checkpoint_vars(self.path)

Callers 1

_match_varsMethod · 0.80

Calls 2

Tested by

no test coverage detected