MCPcopy Create free account
hub / github.com/Doragd/Chinese-Chatbot-PyTorch-Implementation / forward

Method forward

model.py:139–178  ·  view source on GitHub ↗

input_step: decoder是逐字生成的,即每个timestep产生一个字, decoder接收的输入: input_step='/SOS'的索引 和 encoder的最后时刻的最后一层hidden输出 故shape:[1, batch_size] last_hidden: 上一个GRUCell的hidden输出 初始值为encoder的最后时刻的最后一层hidden输出,传入的是encoder_hidden的正向部

(self, input_step, last_hidden, encoder_outputs)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected