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

RuntimeError #4

Open
zuiwomeirenxi opened this issue Dec 15, 2023 · 0 comments
Open

RuntimeError #4

zuiwomeirenxi opened this issue Dec 15, 2023 · 0 comments

Comments

@zuiwomeirenxi
Copy link

Traceback (most recent call last):
File "C:\video_anomaly_diffusion-main\video_anomaly_diffusion-main\train_ano.py", line 371, in
main()
File "C:\video_anomaly_diffusion-main\video_anomaly_diffusion-main\train_ano.py", line 367, in main
main_objective(config, args)
File "C:\video_anomaly_diffusion-main\video_anomaly_diffusion-main\train_ano.py", line 282, in main_objective
evaluate()
File "D:\anaconda\envs\diffuser\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:\anaconda\envs\diffuser\lib\contextlib.py", line 79, in inner
return func(*args, **kwds)
File "C:\video_anomaly_diffusion-main\video_anomaly_diffusion-main\train_ano.py", line 261, in evaluate
preds_auc = auroc(gen_preds, labels,task="binary")
File "D:\anaconda\envs\diffuser\lib\site-packages\torchmetrics\functional\classification\auroc.py", line 470, in auroc
return binary_auroc(preds, target, max_fpr, thresholds, ignore_index, validate_args)
File "D:\anaconda\envs\diffuser\lib\site-packages\torchmetrics\functional\classification\auroc.py", line 174, in binary_auroc
_binary_precision_recall_curve_tensor_validation(preds, target, ignore_index)
File "D:\anaconda\envs\diffuser\lib\site-packages\torchmetrics\functional\classification\precision_recall_curve.py", line 135, in _binary_precision_recall_curve_tensor_validation
_check_same_shape(preds, target)
File "D:\anaconda\envs\diffuser\lib\site-packages\torchmetrics\utilities\checks.py", line 42, in _check_same_shape
raise RuntimeError(
RuntimeError: Predictions and targets are expected to have the same shape, but got torch.Size([138244, 512]) and torch.Size([138244]).

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