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

sampling in generate_file_batch() #1

Open
thisray opened this issue Oct 23, 2018 · 0 comments
Open

sampling in generate_file_batch() #1

thisray opened this issue Oct 23, 2018 · 0 comments

Comments

@thisray
Copy link

thisray commented Oct 23, 2018

Hi,

If len(lines) = 4, list(range(len(lines) - 1)) would be only [0, 1, 2]
So.. Is here need to remove -1 to make sure the sample result is include the last line of file?

from:

c = Counter(np.random.choice(range(len(lines) - 1), size = batch_size))

to:
c = Counter(np.random.choice(range(len(lines)), size = batch_size))

thanks

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