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

Function f

tensorpack/models/regularize.py:92–95  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

90 prefixlen = len(prefix)
91
92 def f(name):
93 if name.startswith(prefix):
94 return name[prefixlen:]
95 return name
96 names = list(map(f, names))
97 logger.info("regularize_cost() found {} variables to regularize.".format(len(names)))
98 _log_once("The following tensors will be regularized: {}".format(', '.join(names)))

Callers 2

applyMethod · 0.70
applyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected