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

Report an error #6

Closed
syjxxxx opened this issue Sep 9, 2022 · 19 comments
Closed

Report an error #6

syjxxxx opened this issue Sep 9, 2022 · 19 comments

Comments

@syjxxxx
Copy link

syjxxxx commented Sep 9, 2022

Report an error:
FileNotFoundError: [Errno 2] No such file or directory: 'experiments/i3d/results/I3D_EDLNoKLAvUCDebias_EDL_trainset_uncertainties.npz'
Experiments finished!
Is there something wrong or missed in the operation?

@Cogito2012
Copy link
Owner

@syjxxxx Seems like you forgot to execute the bash run_get_threshold.sh 0 edlnokl_avuc_debias 2, which will generate the missing file you need :)

@syjxxxx
Copy link
Author

syjxxxx commented Sep 9, 2022

This error is because of an error when execute the bash run_get_threshold.sh 0 edlnokl_avuc_debias 2
我是在运行bash run_get_threshold.sh 0 edlnokl_avuc_debias 2的时候报的错

@Cogito2012
Copy link
Owner

You can double-check if the file exist or not in your system. If exists, then it's likely that you are not executing the command in the directory experiments/i3d. If not exist, then you probably need to check if you have write permission of the directory experiments/i3d/results.

@syjxxxx
Copy link
Author

syjxxxx commented Sep 9, 2022

The file in not exist.
finetune_i3d_rpl_ucf101.sh,finetune_i3d_edlnokl_ucf101.sh,finetune_i3d_edlnokl_avuc_debias_ucf101.sh,finetune_i3d_dnn_ucf101.sh,finetune_i3d_bnn_ucf101.sh Are these five files run during the training phase?
In the README only execute the finetune_i3d_edlnokl_avuc_debias_ucf101.sh.

@Cogito2012
Copy link
Owner

These five files are scripts to train different models based on the i3d backbone. In README, I simply used the edlnokl_avuc_debias model as an example. You definitely could try others.

@syjxxxx
Copy link
Author

syjxxxx commented Sep 9, 2022

Do all five files need to be run during the training phase?

@Cogito2012
Copy link
Owner

No, you should know which model you want to train.

@syjxxxx
Copy link
Author

syjxxxx commented Sep 9, 2022

Ok, I know.Thank you!

@syjxxxx
Copy link
Author

syjxxxx commented Sep 9, 2022

I have write permission but I don't know what wrong

@Cogito2012
Copy link
Owner

In the directory experiments/i3d, you could try to remove/rename the folder results first, then run the command bash run_get_threshold.sh 0 edlnokl_avuc_debias 2.

If the error still appears, you may need to debug the code experiments/get_threshold.py

@syjxxxx
Copy link
Author

syjxxxx commented Sep 9, 2022

OK,I know. Thank you!

@syjxxxx
Copy link
Author

syjxxxx commented Sep 12, 2022

Run 'bash run_openness.sh HMDB' :
AssertionError: File not found! Run ood_detection first!
Then I run the 'run_ood_detection.sh',it will report 'ValueError: need at least one array to concatenate'.

Is line 66,70 of the run_ood_detection.sh named incorrectly?

@Cogito2012
Copy link
Owner

line 66 is the checkpoint file of trained model, and line 70 is the file to store results byrun_ood_detection.sh .
The ValueError should not be related to these lines. You may paste the full error report here.

@syjxxxx
Copy link
Author

syjxxxx commented Sep 12, 2022

The model and loaded state dict do not match exactly

unexpected key in source state_dict: debias_head.f1_conv3d.conv.weight, debias_head.f1_conv3d.bn.weight, debias_head.f1_conv3d.bn.bias, debias_head.f1_conv3d.bn.running_mean, debias_head.f1_conv3d.bn.running_var, debias_head.f1_conv3d.bn.num_batches_tracked, debias_head.f2_conv3d.conv.weight, debias_head.f2_conv3d.bn.weight, debias_head.f2_conv3d.bn.bias, debias_head.f2_conv3d.bn.running_mean, debias_head.f2_conv3d.bn.running_var, debias_head.f2_conv3d.bn.num_batches_tracked, debias_head.f3_conv2d.conv.weight, debias_head.f3_conv2d.bn.weight, debias_head.f3_conv2d.bn.bias, debias_head.f3_conv2d.bn.running_mean, debias_head.f3_conv2d.bn.running_var, debias_head.f3_conv2d.bn.num_batches_tracked, debias_head.f1_fc.weight, debias_head.f1_fc.bias, debias_head.f2_fc.weight, debias_head.f2_fc.bias, debias_head.f3_fc.weight, debias_head.f3_fc.bias

completed: 0, elapsed: 0sTraceback (most recent call last):
File "experiments/ood_detection.py", line 259, in
main()
File "experiments/ood_detection.py", line 205, in main
ood_confidences, ood_uncertainties, ood_results, ood_labels = run_inference(model, args.ood_data, npass=args.forward_pass)
File "experiments/ood_detection.py", line 175, in run_inference
all_confidences, all_uncertainties, all_results, all_gts = run_evidence_inference(model, data_loader, evidence)
File "experiments/ood_detection.py", line 146, in run_evidence_inference
all_confidences = np.concatenate(all_confidences, axis=0)
File "<array_function internals>", line 5, in concatenate
ValueError: need at least one array to concatenate
Experiments finished!

1 similar comment
@syjxxxx
Copy link
Author

syjxxxx commented Sep 12, 2022

The model and loaded state dict do not match exactly

unexpected key in source state_dict: debias_head.f1_conv3d.conv.weight, debias_head.f1_conv3d.bn.weight, debias_head.f1_conv3d.bn.bias, debias_head.f1_conv3d.bn.running_mean, debias_head.f1_conv3d.bn.running_var, debias_head.f1_conv3d.bn.num_batches_tracked, debias_head.f2_conv3d.conv.weight, debias_head.f2_conv3d.bn.weight, debias_head.f2_conv3d.bn.bias, debias_head.f2_conv3d.bn.running_mean, debias_head.f2_conv3d.bn.running_var, debias_head.f2_conv3d.bn.num_batches_tracked, debias_head.f3_conv2d.conv.weight, debias_head.f3_conv2d.bn.weight, debias_head.f3_conv2d.bn.bias, debias_head.f3_conv2d.bn.running_mean, debias_head.f3_conv2d.bn.running_var, debias_head.f3_conv2d.bn.num_batches_tracked, debias_head.f1_fc.weight, debias_head.f1_fc.bias, debias_head.f2_fc.weight, debias_head.f2_fc.bias, debias_head.f3_fc.weight, debias_head.f3_fc.bias

completed: 0, elapsed: 0sTraceback (most recent call last):
File "experiments/ood_detection.py", line 259, in
main()
File "experiments/ood_detection.py", line 205, in main
ood_confidences, ood_uncertainties, ood_results, ood_labels = run_inference(model, args.ood_data, npass=args.forward_pass)
File "experiments/ood_detection.py", line 175, in run_inference
all_confidences, all_uncertainties, all_results, all_gts = run_evidence_inference(model, data_loader, evidence)
File "experiments/ood_detection.py", line 146, in run_evidence_inference
all_confidences = np.concatenate(all_confidences, axis=0)
File "<array_function internals>", line 5, in concatenate
ValueError: need at least one array to concatenate
Experiments finished!

@Cogito2012
Copy link
Owner

I just tested the command bash run_ood_detection.sh 0 HMDB edlnokl_avuc_debias, which should be the same as yours. But I didn't find any error reported. Actually, the debias_head is not used in inference so the unexpected key errors should not be reported.

@syjxxxx
Copy link
Author

syjxxxx commented Sep 13, 2022

The hmdb51_[train,val]split[1,2,3]_videos.txt file I generated while processing the hmdb dataset is 0.
Is it for this reason?

@MengyuanChen21
Copy link

I also met the two errors reported by @syjxxxx. They really exist, and below are my solutions.

The first error about run_get_threhold.sh can be easily solved by manually create an empty directory experiments/i3d/results.

The second error about run_ood_detection.sh is caused by a bug of this version of mmaction2. The dataset split files downloaded by the scripts provided by mmaction2 (trainlist01/02/03.txt, testlist01/02/03.txt and classIndex.txt) are empty. Maybe authors can directly provide these files in this repo for convenience.

@Cogito2012
Copy link
Owner

Hi Mengyuan,
Thanks for the help! Here I uploaded the training and evaluation splits to the Google Drive.

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