Skip to content

sampling in generate_file_batch() #1

@thisray

Description

@thisray

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions