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

About running #14

Open
xixiaxsssd opened this issue Apr 26, 2024 · 9 comments
Open

About running #14

xixiaxsssd opened this issue Apr 26, 2024 · 9 comments

Comments

@xixiaxsssd
Copy link

Length of dataset: 0
Traceback (most recent call last):
File "/content/UniversalFakeDetect/train.py", line 70, in
ap, r_acc, f_acc, acc = validate(model.model, val_loader)
File "/content/UniversalFakeDetect/validate.py", line 116, in validate
ap = average_precision_score(y_true, y_pred)
File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_ranking.py", line 234, in average_precision_score
return _average_binary_score(
File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_base.py", line 75, in _average_binary_score
return binary_metric(y_true, y_score, sample_weight=sample_weight)
File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_ranking.py", line 207, in _binary_uninterpolated_average_precision
precision, recall, _ = precision_recall_curve(
File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_ranking.py", line 878, in precision_recall_curve
fps, tps, thresholds = _binary_clf_curve(
File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_ranking.py", line 787, in _binary_clf_curve
tps = stable_cumsum(y_true * weight)[threshold_idxs]
File "/usr/local/lib/python3.10/dist-packages/sklearn/utils/extmath.py", line 1142, in stable_cumsum
out.take(-1, axis=axis), expected, rtol=rtol, atol=atol, equal_nan=True
IndexError: cannot do a non-empty take from an empty axes.

How can i fix it?Is my dataset causing that error?

@xixiaxsssd xixiaxsssd changed the title About in running About running Apr 26, 2024
@SleeplessBegonia
Copy link

me 2.how did u solve it?

@YuZehanghhh
Copy link

me 2.how did u solve it?
same issue, did u solve it?

@SleeplessBegonia
Copy link

not yet

me 2.how did u solve it?
same issue, did u solve it?

@1989XiaoXin
Copy link

Hi,try to modify dataset_paths.py

@wenxian-ok
Copy link

Hi,try to modify dataset_paths.py

How did you modify it? I also encountered this problem!

@freely000
Copy link

I also encountered this issuse, how to solve it, please?

@SleeplessBegonia
Copy link

I also encountered this issuse, how to solve it, please?

#14 (comment)

@freely000
Copy link

I also encountered this issuse, how to solve it, please?

#14 (comment)

It's useful. Thank you very much!

@hjs-2002
Copy link

help

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

7 participants