MCPcopy Create free account
hub / github.com/Shreyz-max/Video-Captioning / decode_sequence2bs

Method decode_sequence2bs

predict_test.py:54–59  ·  view source on GitHub ↗
(self, input_seq)

Source from the content-addressed store, hash-verified

52 return ' '.join(sentence.split()[:-1])
53
54 def decode_sequence2bs(self, input_seq):
55 states_value = self.inf_encoder_model.predict(input_seq)
56 target_seq = np.zeros((1, 1, self.num_decoder_tokens))
57 target_seq[0, 0, self.tokenizer.word_index['bos']] = 1
58 self.beam_search(target_seq, states_value, [], [], 0)
59 return decode_seq
60
61 def beam_search(self, target_seq, states_value, prob, path, lens):
62 """

Callers 1

testMethod · 0.95

Calls 1

beam_searchMethod · 0.95

Tested by

no test coverage detected