(l)
| 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) |
no outgoing calls
no test coverage detected
searching dependent graphs…