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

Class MismatchLogger

tensorpack/tfutils/sessinit.py:75–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74
75class MismatchLogger(object):
76 def __init__(self, exists, nonexists):
77 self._exists = exists
78 self._nonexists = nonexists
79 self._names = []
80
81 def add(self, name):
82 self._names.append(get_op_tensor_name(name)[0])
83
84 def log(self):
85 if len(self._names):
86 logger.warn("The following variables are in the {}, but not found in the {}: {}".format(
87 self._exists, self._nonexists, ', '.join(self._names)))
88
89
90class SaverRestore(SessionInit):

Callers 2

_match_varsMethod · 0.85
_run_initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected