memn2n
memn2n copied to clipboard
Puzzled about the attention part
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
-
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)