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

Runtime error:zero-dimensional tensor(at position 0) cannot be contatenated #27

Open
Llq201809 opened this issue Mar 17, 2019 · 3 comments

Comments

@Llq201809
Copy link

when I run train_p_net.py ,it shows these error:
Traceback (most recent call last):
File "dface/train_net/train_p_net.py", line 50, in
end_epoch=args.end_epoch, frequent=args.frequent, lr=args.lr, batch_size=args.batch_size, use_cuda=args.use_cuda)
File "dface/train_net/train_p_net.py", line 17, in train_net
train_pnet(model_store_path=model_store_path, end_epoch=end_epoch, imdb=gt_imdb, batch_size=batch_size, frequent=frequent, base_lr=lr, use_cuda=use_cuda)
File "/home/li/DFace/dface/train_net/train.py", line 97, in train_pnet
accuracy_avg = torch.mean(torch.cat(accuracy_list))
RuntimeError: zero-dimensional tensor (at position 0) cannot be concatenated

@Dawnlnz
Copy link

Dawnlnz commented Mar 18, 2019

Hello, I have the same problem.Have you saved it?

@Dawnlnz
Copy link

Dawnlnz commented Mar 18, 2019

Thank,I have solved it.

@markson14
Copy link

change the error line into accuracy_avg = torch.mean(torch.stack(accuracy_list, dim=0))

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

3 participants