JosephKJ / OWOD

(CVPR 2021 Oral) Open World Object Detection
https://josephkj.in
Apache License 2.0
1.04k stars 155 forks source link

ValueError: Expected value argument (Tensor of shape (100,)) to be within the support (GreaterThan(lower_bound=0.0)) of the distribution Weibull #110

Closed JiuqingDong closed 1 year ago

JiuqingDong commented 1 year ago

When I run this command: (It is a test command) python tools/train_net.py --num-gpus 4 --eval-only --config-file ./configs/OWOD/t1/t1_test.yaml SOLVER.IMS_PER_BATCH 4 SOLVER.BASE_LR 0.005 OUTPUT_DIR "./output/t1_final" MODEL.WEIGHTS "/home/multiai3/Jiuqing/OWOD-master/output/t1/model_final.pth"

I got an Error as follows:

Traceback (most recent call last): File "tools/train_net.py", line 169, in args=(args,), File "/home/multiai3/Jiuqing/OWOD-master/detectron2/engine/launch.py", line 59, in launch daemon=False, File "/home/multiai3/anaconda3/envs/OWOD/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn return start_processes(fn, args, nprocs, join, daemon, start_method='spawn') File "/home/multiai3/anaconda3/envs/OWOD/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes while not context.join(): File "/home/multiai3/anaconda3/envs/OWOD/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 150, in join raise ProcessRaisedException(msg, error_index, failed_process.pid) torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 2 terminated with the following error: Traceback (most recent call last): File "/home/multiai3/anaconda3/envs/OWOD/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap fn(i, args) File "/home/multiai3/Jiuqing/OWOD-master/detectron2/engine/launch.py", line 94, in _distributed_worker main_func(args) File "/home/multiai3/Jiuqing/OWOD-master/tools/train_net.py", line 139, in main res = Trainer.test(cfg, model) File "/home/multiai3/Jiuqing/OWOD-master/detectron2/engine/defaults.py", line 525, in test results_i = inference_on_dataset(model, data_loader, evaluator) File "/home/multiai3/Jiuqing/OWOD-master/detectron2/evaluation/evaluator.py", line 145, in inference_on_dataset evaluator.process(inputs, outputs) File "/home/multiai3/Jiuqing/OWOD-master/detectron2/evaluation/pascal_voc_evaluation.py", line 122, in process classes = self.update_label_based_on_energy(logits, classes) File "/home/multiai3/Jiuqing/OWOD-master/detectron2/evaluation/pascal_voc_evaluation.py", line 102, in update_label_based_on_energy p_known = self.compute_prob(energy, self.known_dist) File "/home/multiai3/Jiuqing/OWOD-master/detectron2/evaluation/pascal_voc_evaluation.py", line 87, in compute_prob pdf = distribution.log_prob(dx).exp() File "/home/multiai3/anaconda3/envs/OWOD/lib/python3.7/site-packages/torch/distributions/transformed_distribution.py", line 149, in log_prob log_prob = log_prob + _sum_rightmost(self.base_dist.log_prob(y), File "/home/multiai3/anaconda3/envs/OWOD/lib/python3.7/site-packages/torch/distributions/transformed_distribution.py", line 138, in log_prob self._validate_sample(value) File "/home/multiai3/anaconda3/envs/OWOD/lib/python3.7/site-packages/torch/distributions/distribution.py", line 289, in _validate_sample "Expected value argument " ValueError: Expected value argument (Tensor of shape (100,)) to be within the support (GreaterThan(lower_bound=0.0)) of the distribution Weibull(scale: 3.947634220123291, concentration: 2.3650074005126953), but found invalid values: tensor([-0.0010, 0.0091, 0.0192, 0.0293, 0.0394, 0.0495, 0.0596, 0.0697, 0.0798, 0.0899, 0.1000, 0.1101, 0.1202, 0.1303, 0.1404, 0.1505, 0.1606, 0.1707, 0.1808, 0.1909, 0.2010, 0.2111, 0.2212, 0.2313, 0.2414, 0.2515, 0.2616, 0.2717, 0.2818, 0.2919, 0.3020, 0.3121, 0.3222, 0.3323, 0.3424, 0.3525, 0.3626, 0.3727, 0.3828, 0.3929, 0.4030, 0.4131, 0.4232, 0.4333, 0.4434, 0.4535, 0.4636, 0.4737, 0.4838, 0.4939, 0.5040, 0.5141, 0.5242, 0.5343, 0.5444, 0.5546, 0.5647, 0.5748, 0.5849, 0.5950, 0.6051, 0.6152, 0.6253, 0.6354, 0.6455, 0.6556, 0.6657, 0.6758, 0.6859, 0.6960, 0.7061, 0.7162, 0.7263, 0.7364, 0.7465, 0.7566, 0.7667, 0.7768, 0.7869, 0.7970, 0.8071, 0.8172, 0.8273, 0.8374, 0.8475, 0.8576, 0.8677, 0.8778, 0.8879, 0.8980, 0.9081, 0.9182, 0.9283, 0.9384, 0.9485, 0.9586, 0.9687, 0.9788, 0.9889, 0.9990])

could you tell me why this error happened?

JiuqingDong commented 1 year ago

I find the result in the issue. At frist I didn't find because of the title. I think this title should be correct.

https://github.com/JosephKJ/OWOD/issues/66#issuecomment-1066089566

Thank you for your job!