Nice work @anuragmishracse and the implementation is almost perfect.
While prediction,can you help me by adding beam search(say k=3,5,7 are beam sizes) instead of taking the best case by using argmax.
def predict(self, image_path):
image = self.read_image(image_name)
prediction = self.model.predict(np.asarray([image]))
prediction = np.argmax(prediction, axis=1)
return self.rev_label_map[prediction]
I have my input in the similar format and is working fine for the argmax,but it is really urgent for me to test with the beam search.please help me by adding beam search.Thanking you in advance.