DEAR icon indicating copy to clipboard operation
DEAR copied to clipboard

Report an error

Open syjxxxx opened this issue 3 years ago • 17 comments

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?

syjxxxx avatar Sep 09 '22 10:09 syjxxxx

@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 :)

Cogito2012 avatar Sep 09 '22 14:09 Cogito2012

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的时候报的错

syjxxxx avatar Sep 09 '22 14:09 syjxxxx

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.

Cogito2012 avatar Sep 09 '22 14:09 Cogito2012

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.

syjxxxx avatar Sep 09 '22 14:09 syjxxxx

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.

Cogito2012 avatar Sep 09 '22 15:09 Cogito2012

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

syjxxxx avatar Sep 09 '22 15:09 syjxxxx

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

Cogito2012 avatar Sep 09 '22 15:09 Cogito2012

Ok, I know.Thank you!

syjxxxx avatar Sep 09 '22 15:09 syjxxxx

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

syjxxxx avatar Sep 09 '22 15:09 syjxxxx

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

Cogito2012 avatar Sep 09 '22 15:09 Cogito2012

OK,I know. Thank you!

syjxxxx avatar Sep 09 '22 15:09 syjxxxx

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?

syjxxxx avatar Sep 12 '22 13:09 syjxxxx

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.

Cogito2012 avatar Sep 12 '22 14:09 Cogito2012

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!

syjxxxx avatar Sep 12 '22 14:09 syjxxxx

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!

syjxxxx avatar Sep 12 '22 14:09 syjxxxx

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.

Cogito2012 avatar Sep 12 '22 15:09 Cogito2012

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?

syjxxxx avatar Sep 13 '22 07:09 syjxxxx

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.

MengyuanChen21 avatar Sep 21 '23 05:09 MengyuanChen21

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

Cogito2012 avatar Sep 22 '23 18:09 Cogito2012