NELSONZHAO / zhihu

This repo contains the source code in my personal column (https://zhuanlan.zhihu.com/zhaoyeyu), implemented using Python 3.6. Including Natural Language Processing and Computer Vision projects, such as text generation, machine translation, deep convolution GAN and other actual combat code.
https://zhuanlan.zhihu.com/zhaoyeyu
3.5k stars 2.14k forks source link

generate_lyric项目中target和logits形状 #31

Closed BellaZbl closed 5 years ago

BellaZbl commented 5 years ago
  1. cell = tf.contrib.rnn.MultiRNNCell([lstm]) 这里是只有一层rnn吗?

  2. logits = tf.contrib.layers.fully_connected(outputs, vocab_size, activation_fn=None) 这里logits的shape是 batch_size,seq_len,vocab_size可是target是batch_size,seq_len,embed_dim 请问这两个怎么求损失?