Skip to content

Commit

Permalink
Update attmodel.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tyliupku authored Apr 17, 2018
1 parent 0372b9e commit ccd075f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions attmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def __init__(self, pad_len, num_rels, word_vectors, window_size, num_filters, em
l2_loss += tf.nn.l2_loss(W)
l2_loss += tf.nn.l2_loss(b)

# the implementation of Lin et al 2016 comes from https://github.com/thunlp/TensorFlow-NRE/blob/master/network.py
sen_a = tf.get_variable("attention_A", [3*self.num_filters], initializer=tf.contrib.layers.xavier_initializer())
sen_q = tf.get_variable("query", [3*self.num_filters, 1], initializer=tf.contrib.layers.xavier_initializer())
sen_r = []
Expand Down

0 comments on commit ccd075f

Please sign in to comment.