def output_fn(cell_output):
if cell_output is None:
return tf.zeros([LETTERS], tf.float32) # only used for shape inference
else:
return tf_layers.linear(cell_output, num_outputs=LETTERS, scope="rnn_output")
# Input function (makes rnn input from word id and cell state)
评论列表
文章目录