You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also ran into the problem here, problem
and I used the corresponding code you provided:
cap = captions[0].data.cpu().numpy()
sentence = ""
for j in range(len(cap)):
if cap[j] == 0:
break
word = self.ixtoword[cap[j]].encode('ascii', 'ignore').decode('ascii')
sentence += word + " "
I am confused about why this code was generating multiple same images under a same keys[j](referring to the screenshot below, the same generated images were sampled due to a same keys[j]), with different captions:
The text was updated successfully, but these errors were encountered:
I found out the problem by myself. The var name coincidently conflicts with the parent for loop var(.........)
cap = captions[0].data.cpu().numpy()
sentence = ""
for l in range(len(cap)):
if cap[l] == 0:
break
word = self.ixtoword[cap[l]].encode('ascii', 'ignore').decode('ascii')
sentence += word + " "
I also ran into the problem here,
problem
and I used the corresponding code you provided:
cap = captions[0].data.cpu().numpy()
sentence = ""
for j in range(len(cap)):
if cap[j] == 0:
break
word = self.ixtoword[cap[j]].encode('ascii', 'ignore').decode('ascii')
sentence += word + " "
and the altered sampling function:
ubuntu pastebin
I am confused about why this code was generating multiple same images under a same keys[j](referring to the screenshot below, the same generated images were sampled due to a same keys[j]), with different captions:

The text was updated successfully, but these errors were encountered: