MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / testIndicesToWords

Method testIndicesToWords

sentiment/python/imdb_test.py:52–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50 self.assertEqual('bar', reverse_index[forward_index['bar']])
51
52 def testIndicesToWords(self):
53 forward_index = imdb.get_word_index()
54 reverse_index = imdb.get_word_index(reverse=True)
55 indices = [forward_index[word] + imdb.INDEX_FROM
56 for word in ['one', 'two', 'three']]
57 self.assertEqual(['one', 'two', 'three'],
58 imdb.indices_to_words(reverse_index, indices))
59
60 def testTrainLSTMModel(self):
61 data_size = 10

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected