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

The experiments about model size #9

Closed
Zi-YuanYang opened this issue Nov 11, 2022 · 1 comment
Closed

The experiments about model size #9

Zi-YuanYang opened this issue Nov 11, 2022 · 1 comment

Comments

@Zi-YuanYang
Copy link

Hi,
I wanna test the results of model size under 75 nodes setting in CIFAR-100, but it

  assert (classes_per_user * num_users) % num_classes == 0, "equal classes appearance is needed"
AssertionError: equal classes appearance is needed

If I ignore this assert, it would appear another error:

    class_partitions['prob'].append([class_dict[i]['prob'].pop() for i in c])
IndexError: pop from empty list

Anything is okay in other node number or in CIFAR-10. Could u plz tell me how to fix it, thx a lot.

@Zi-YuanYang
Copy link
Author

Hi, I wanna test the results of model size under 75 nodes setting in CIFAR-100, but it

  assert (classes_per_user * num_users) % num_classes == 0, "equal classes appearance is needed"
AssertionError: equal classes appearance is needed

If I ignore this assert, it would appear another error:

    class_partitions['prob'].append([class_dict[i]['prob'].pop() for i in c])
IndexError: pop from empty list

Anything is okay in other node number or in CIFAR-10. Could u plz tell me how to fix it, thx a lot.

Avia gave me the solution, and class number follows the previous setting.

Comment out the assert line, and change
count_per_class = (classes_per_user * num_users) // num_classes
to
count_per_class = (classes_per_user * num_users) // num_classes + 1.

It really works, thx Avia!

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