MCPcopy Create free account
hub / github.com/tensorflow/models / _loss

Method _loss

official/benchmark/tf_scan_benchmark.py:71–74  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

69 return all_alphas
70
71 def _loss(self, x, y):
72 logits = tf.cast(x, dtype=tf.float32)
73 loss = self._loss_fn_with_scan(logits, self.transition_param)
74 return tf.reduce_mean(loss)
75
76 @tf.function
77 def train_on_batch(self, *args):

Callers 1

train_on_batchMethod · 0.95

Calls 1

_loss_fn_with_scanMethod · 0.95

Tested by

no test coverage detected