Open chullhwan-song opened 4 years ago
conv = tf.nn.conv2d( self.embedded_chars_left, W, strides=[1, 1, 1, 1], padding="VALID",name="conv")
h = tf.nn.relu(tf.nn.bias_add(conv, b), name="relu")
pooled = tf.nn.max_pool( h, ksize=[1, max_len_left - filter_size + 1, 1, 1], strides=[1, 1, 1, 1], padding='VALID', name="pool")
self.pos_scores = self.conv_model(self.query_emb,self.pos_doc_emb)
self.neg_scores = self.conv_model(self.query_emb, self.neg_doc_emb)
self.loss = tf.reduce_mean(tf.maximum(0.0, 1 - self.pos_scores + self.neg_scores))
https://arxiv.org/pdf/1802.08988.pdf