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

Method to_sample

tf_euler/python/solution/base_unsupervise.py:56–61  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

54 return emb
55
56 def to_sample(self, inputs):
57 src = tf.expand_dims(inputs, -1)
58 pos = self.pos_sample_fn(inputs)
59 negs = self.neg_sample_fn(inputs)
60 assert len(negs.get_shape().as_list()) == 2 and len(pos.get_shape().as_list()) == 2
61 return src, pos, negs
62
63 def __call__(self, inputs):
64 src, pos, negs = self.to_sample(inputs)

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected