hlamba28 / Automatic-Image-Captioning

Generating Captions for images using Deep Learning
https://towardsdatascience.com/image-captioning-with-keras-teaching-computers-to-describe-pictures-c88a46a311b8
120 stars 80 forks source link

Undefined Variable #9

Closed merveenoyan closed 2 years ago

merveenoyan commented 2 years ago

Hello, I went ahead and tried to make your tutorial work. It has a variable called z that idk what it does and it's not defined before the line it's used, tried to assign integers but I get errors during greedy search (naturally). Can you help me out?

z+=1
pic = list(encoding_test.keys())[z]
image = encoding_test[pic].reshape((1,2048))
x=plt.imread(images+pic)
plt.imshow(x)
plt.show()
print("Greedy:",greedySearch(image))