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

Function maploss

tensorpack/models/regularize.py:131–135  ·  view source on GitHub ↗
(l)

Source from the content-addressed store, hash-verified

129 "in REGULARIZATION_LOSSES collection.".format(len(losses)))
130
131 def maploss(l):
132 assert l.dtype.is_floating, l
133 if l.dtype != tf.float32:
134 l = tf.cast(l, tf.float32)
135 return l
136
137 losses = [maploss(l) for l in losses]
138 reg_loss = tf.add_n(losses, name=name)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…