Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

decoder_inputs' first element is not matched with GO flag's index #131

Closed
Harmonicahappy opened this issue Apr 13, 2019 · 1 comment
Closed

Comments

@Harmonicahappy
Copy link
Contributor

First of all, you define GO flag's index as 1 in data_gen.py:

class DataGen(object):
    GO_ID = 1
    EOS_ID = 2
    IMAGE_HEIGHT = 32
    CHARMAP = ['', '', ''] + list('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Second, decoder_inputs will be filled with value 0 in model.py:

self.decoder_inputs = []
self.target_weights = []
for i in xrange(self.decoder_size + 1):
    self.decoder_inputs.append(
        tf.tile([0], [num_images])
    )

In train mode, it is ok because decoder_inputs will be filled with ground truth labels, but in predict mode, first element of decoder_inputs will be 0, and it is not the correct index for GO flag. Am I right?

@emedvedev
Copy link
Owner

Fixed in #132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants