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

[08-seq_classification.ipynb] Creation of the same batch element by Dataset Generator. #851

Open
gokulkrishna98 opened this issue Nov 29, 2024 · 0 comments

Comments

@gokulkrishna98
Copy link

def __getitem__(self, index):

In the following getitem() method, the index variable is not used. So, every batch generated is identical since seed is set by the get_predefined_generator().

Not sure, if this is intended behavior. Essentially, we are training same batch element over (1000/batch_size) iterations and across epochs.

    def __getitem__(self, index):
        batch_x, batch_y = [], []
        for _ in range(self.batch_size):
            x, y = self.generate_pair()
            batch_x.append(x)
            batch_y.append(y)
        return self.encode_x_batch(batch_x), self.encode_y_batch(batch_y)
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