memn2n icon indicating copy to clipboard operation
memn2n copied to clipboard

Puzzled about the attention part

Open JustinLin610 opened this issue 7 years ago • 1 comments

m_C = tf.reduce_sum(m_emb_C * self._encoding, 2) c_temp = tf.transpose(m_C, [0, 2, 1])

Here in this part, the first line with reduce_sum should turn the matrix into 2-dimension, so I think it won't work for the transposition in the second line. I am not sure if I am getting something wrong

JustinLin610 avatar Oct 23 '17 11:10 JustinLin610

  • shape[m_emb_C]=(?,10,7,20)

  • shape[self._encoding]=(7 ,20)

  • shape(m_emb_C * self._encoding)=(?,10,7,20)

  • shape(m_C )= (?,10,20)

  • shape(c_temp)= (?,20,10)

kodakfu avatar Apr 18 '18 06:04 kodakfu