| 28 | return self.out_fc(inputs) |
| 29 | |
| 30 | class PosNegLogits(object): |
| 31 | def __call__(self, emb, pos_emb, neg_emb): |
| 32 | logit = tf.matmul(emb, pos_emb, transpose_b=True) |
| 33 | neg_logit = tf.matmul(emb, neg_emb, transpose_b=True) |
| 34 | return logit, neg_logit |
| 35 | |
| 36 | class CosineLogits(object): |
| 37 | def __call__(self, target_emb, context_emb): |