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

when i run the file train #12

Open
Yx1322441675 opened this issue Dec 27, 2021 · 1 comment
Open

when i run the file train #12

Yx1322441675 opened this issue Dec 27, 2021 · 1 comment

Comments

@Yx1322441675
Copy link

Epoch 1 has 10408 labeled samples of 234 ids and 2528 unlabeled samples
Traceback (most recent call last):
File "examples/main.py", line 381, in
main()
File "examples/main.py", line 151, in main
main_worker(args)
File "examples/main.py", line 279, in main_worker
feat_nv2recon, f, f_recon, f_nv, f_nv2recon, pid, index, config, iterations)
File "/home/ly/yx/GCL/gcl/trainer.py", line 112, in gen_update
self.memory_loss_id = self.memory(F.normalize(f), F.normalize(f_nv), index)
File "/home/ly/anaconda3/envs/GCL/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/ly/yx/GCL/gcl/models/memory.py", line 66, in forward
negatives = torch.stack(negatives)
RuntimeError: stack expects each tensor to be equal size, but got [8192] at entry 0 and [7833] at entry 3

@xiaobenniao1
Copy link

xiaobenniao1 commented Oct 18, 2023

Epoch 1 has 10408 labeled samples of 234 ids and 2528 unlabeled samples Traceback (most recent call last): File "examples/main.py", line 381, in main() File "examples/main.py", line 151, in main main_worker(args) File "examples/main.py", line 279, in main_worker feat_nv2recon, f, f_recon, f_nv, f_nv2recon, pid, index, config, iterations) File "/home/ly/yx/GCL/gcl/trainer.py", line 112, in gen_update self.memory_loss_id = self.memory(F.normalize(f), F.normalize(f_nv), index) File "/home/ly/anaconda3/envs/GCL/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/ly/yx/GCL/gcl/models/memory.py", line 66, in forward negatives = torch.stack(negatives) RuntimeError: stack expects each tensor to be equal size, but got [8192] at entry 0 and [7833] at entry 3

me too

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