MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _create_loss

Method _create_loss

modelzoo/dcn/train.py:279–286  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

277
278 # compute loss
279 def _create_loss(self):
280 self._logits = tf.squeeze(self._logits)
281 self.loss = tf.losses.sigmoid_cross_entropy(
282 self._label,
283 self._logits,
284 scope='loss',
285 reduction=tf.losses.Reduction.SUM_OVER_BATCH_SIZE)
286 tf.summary.scalar('loss', self.loss)
287
288 # define optimizer and generate train_op
289 def _create_optimizer(self):

Callers 1

__init__Method · 0.95

Calls 1

scalarMethod · 0.45

Tested by

no test coverage detected