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

Bug with num_batches? #14

Open
catalys1 opened this issue Sep 7, 2023 · 1 comment
Open

Bug with num_batches? #14

catalys1 opened this issue Sep 7, 2023 · 1 comment

Comments

@catalys1
Copy link

catalys1 commented Sep 7, 2023

It looks like there's a subtle bug on this line:
https://github.com/AntixK/PyTorch-Model-Compare/blob/main/torch_cka/cka.py#L156

num_batches = min(len(dataloader1), len(dataloader1))

len(dataloader1) is in there twice, I assume it's supposed to be

num_batches = min(len(dataloader1), len(dataloader2))
@HuangChiEn
Copy link

It looks like there's a subtle bug on this line: https://github.com/AntixK/PyTorch-Model-Compare/blob/main/torch_cka/cka.py#L156

num_batches = min(len(dataloader1), len(dataloader1))

len(dataloader1) is in there twice, I assume it's supposed to be

num_batches = min(len(dataloader1), len(dataloader2))

It seems rational, it could support such mechanism.
However, I usually compare two models by using the same dataset.

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