MCPcopy
hub / github.com/hunkim/PyTorchZeroToAll / test

Function test

14_1_seq2seq.py:17–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16# Simple test to show how our network works
17def test():
18 encoder_hidden = encoder.init_hidden()
19 word_input = str2tensor('hello')
20 encoder_outputs, encoder_hidden = encoder(word_input, encoder_hidden)
21 print(encoder_outputs)
22
23 decoder_hidden = encoder_hidden
24
25 word_target = str2tensor('pytorch')
26 for c in range(len(word_target)):
27 decoder_output, decoder_hidden = decoder(
28 word_target[c], decoder_hidden)
29 print(decoder_output.size(), decoder_hidden.size())
30
31
32# Train for a given src and target

Callers 1

14_1_seq2seq.pyFile · 0.70

Calls 2

str2tensorFunction · 0.90
init_hiddenMethod · 0.45

Tested by

no test coverage detected