captiongenerator.py is a Python script that generates captions.
Replace the ensuing line with the following
words = np.argsort (word_probabilities) [-self.beam_size:] [::-1]
Still, try using a checkpoints train that has been streamlined with the newest law, If the problem persists.