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

Method _create_loss

modelzoo/ple/train.py:311–319  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

309
310 # compute loss
311 def _create_loss(self):
312 self._logits = tf.squeeze(self._logits)
313 self.loss = tf.losses.sigmoid_cross_entropy(
314 self._label,
315 self._logits,
316 scope='loss',
317 reduction=tf.losses.Reduction.SUM_OVER_BATCH_SIZE)
318 print(self.loss)
319 tf.summary.scalar('loss', self.loss)
320
321 # define optimizer and generate train_op
322 def _create_optimizer(self):

Callers 1

__init__Method · 0.95

Calls 1

scalarMethod · 0.45

Tested by

no test coverage detected