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

someting wrong when create exemplar_set? #6

Closed
alexHxun opened this issue Feb 21, 2022 · 1 comment
Closed

someting wrong when create exemplar_set? #6

alexHxun opened this issue Feb 21, 2022 · 1 comment

Comments

@alexHxun
Copy link

==> Current Class: [50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
==> Building model..
in_features: 512 out_features: 50
current net output dim: 60
old net output dim: 50
[50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
Constructing exemplar set for class-50...
exemplar set shape: 33
Done
Constructing exemplar set for class-51...
exemplar set shape: 33
Done
Constructing exemplar set for class-52...
exemplar set shape: 33
Done
Constructing exemplar set for class-53...
exemplar set shape: 33
Done
Constructing exemplar set for class-54...
exemplar set shape: 33
Done
Constructing exemplar set for class-55...
exemplar set shape: 33
Done
Constructing exemplar set for class-56...
exemplar set shape: 33
Done
Constructing exemplar set for class-57...
exemplar set shape: 33
Done
Constructing exemplar set for class-58...
exemplar set shape: 33
Done
Constructing exemplar set for class-59...
exemplar set shape: 33
Done
start self-distillation for original model.....
setting optimizer and scheduler.................
Traceback (most recent call last):
File "main_imagenet.py", line 472, in
train(model=net, old_model=old_net, epoch=args.epochs, optimizer=optimizer, scheduler=scheduler, lamda=args.lamda, train_loader=trainLoader, use_sd=False, checkPoint=50)
File "main_imagenet.py", line 151, in train
exemplar_set = ExemplarDataset(exemplar_sets, transform=transform_ori)
File "/home/ubuntu/Desktop/Alex/IL/essentials_for_CIL/data/data_loader_imagenet.py", line 17, in init
self.data = np.concatenate(data, axis=0)
File "<array_function internals>", line 6, in concatenate
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 4 dimension(s) and the array at index 1 has 1 dimension(s)

@alexHxun
Copy link
Author

The reason is that the picture size is inconsistent

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