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

Method _mapper

tensorpack/tfutils/gradproc.py:198–203  ·  view source on GitHub ↗
(self, grad, var)

Source from the content-addressed store, hash-verified

196 super(PrintGradient, self).__init__(self._mapper, regex)
197
198 def _mapper(self, grad, var):
199 name = var.op.name
200 if name not in PrintGradient._printed:
201 PrintGradient._printed.add(name)
202 grad = print_stat(grad, message=name + '-grad')
203 return grad
204
205
206class CheckGradient(MapGradient):

Callers

nothing calls this directly

Calls 2

print_statFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected