二维仅词和embedding
1 | import tensorflow as tf |
ids相当于左边,matrix相当于右边待取的词向量,one hot(ids)*matrix
三维加入batch的情况
1 | import tensorflow as tf |
Wisdom and beauty form a very rare combination.
1 | import tensorflow as tf |
ids相当于左边,matrix相当于右边待取的词向量,one hot(ids)*matrix
1 | import tensorflow as tf |