Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ValueError: invalid literal for int() with base 10: 'e' - when making inference #42

Open
Akinleyejoshua opened this issue Feb 17, 2022 · 0 comments

Comments

@Akinleyejoshua
Copy link

code -

sample_sentence = ["a"] * int(sample_size/ni) + ["e"] * int(sample_size/ni) + ["i"] * int(sample_size/ni) + ["o"] * int(sample_size/ni) + ["u"] * int(sample_size/ni)

for i, sentence in enumerate(sample_sentence):
print("seed: %s" % sentence)
sentence = preprocess_caption(sentence)
sample_sentence[i] = [vocab.word_to_id(word) for word in nltk.tokenize.word_tokenize(
sentence)] + [vocab.end_id] # add END_ID

sample_sentence = tl.prepro.pad_sequences(sample_sentence, padding='post')

img_gen, rnn_out = sess.run([net_g_res.outputs, net_rnn_res.outputs], feed_dict={
    t_real_caption: sample_sentence,
    t_z: sample_seed})

save_images(img_gen, [ni, ni], 'samples/gen_samples/gen.png')
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant