---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-18-2cd4da19970d> in <module>
----> 1 op=preditction_with_beam_search("<POS> <CON_START> it is not terrible , but it is very good . <START>",4)
2 op
<ipython-input-16-115b14581f7e> in preditction_with_beam_search(ref_text, beam_width, vocab_length)
66 temp_lt=[0 for i in range(beam_width)]
67 for i,x in enumerate(best_scoes_inx):
---> 68 temp_lt[i] = beam_indexes[x] + [correct_inx[i]]
69 # Update the Beam indexes
70 beam_indexes = temp_lt
TypeError: list indices must be integers or slices, not float
I tried printing and x seems to be a float and not an int. I don't get why this is happening any clues?