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

samples = samples_by_char[char], how to access samples_by_char #14

Closed
VarshaSLalapura opened this issue Feb 17, 2020 · 1 comment
Closed

Comments

@VarshaSLalapura
Copy link

Hi ,

In emnist_lines_dataset.py, we have samples_by_char defaultdict(list) used for
select_letter_samples_for_string() method, inside of which
samples = samples_by_char[char] is returning [ ] since
samples_by_char[char] is actually, samples_by_char[ , 'char'] if am correct. Am stuck with accessing defaultdict(list) with only one of the tuple, i.e char,
Any help?

Many thanks,
Varsha

@VarshaSLalapura
Copy link
Author

I found my mistake. It took me quite a while though.
I had written tuple(mapping[label]) instead of samples_by_char[mapping[label][1]]
which was the reason my default dict was not accessible.

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

1 participant