MCPcopy Create free account
hub / github.com/alibaba/euler / __call__

Method __call__

tf_euler/python/mp_utils/base.py:35–47  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

33 raise NotImplementedError
34
35 def __call__(self, inputs):
36 label, = tf_euler.get_dense_feature(inputs,
37 [self.label_idx],
38 [self.label_dim])
39 embedding = self.embed(inputs)
40 logit = self.out_fc(embedding)
41
42 metric = self.metric_class(
43 label, tf.nn.sigmoid(logit))
44 loss = tf.nn.sigmoid_cross_entropy_with_logits(
45 labels=label, logits=logit)
46 loss = tf.reduce_mean(loss)
47 return (embedding, loss, self.metric_name, metric)
48
49
50class UnsuperviseModel(object):

Callers

nothing calls this directly

Calls 1

embedMethod · 0.95

Tested by

no test coverage detected