def METHOD_NAME(self):
    vocab = text_utils.VocabFromText(self.VOCAB_EXAMPLE_SENTENCES)
    model_config = self.config.model_config.butd
    model = TestDecoderModel(model_config, vocab)
    model.build()
    model.eval()
    sample = Sample()
    sample.dataset_name = "coco"
    sample.dataset_type = "test"
    sample.image_feature_0 = torch.randn(100, 2048)
    sample.answers = torch.zeros((5, 10), dtype=torch.long)
    sample_list = SampleList([sample])
    tokens = model(sample_list)["captions"]
    # these are expected tokens for sum_threshold = 0.5
    expected_tokens = [1.0, 23.0, 38.0, 30.0, 5.0, 11.0, 2.0]
    self.assertEqual(tokens[0].tolist(), expected_tokens)