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: cannot perform reduction function argmax on a tensor with no elements because the operation does not have an identity #33

Open
1s23 opened this issue Jun 22, 2022 · 1 comment

Comments

@1s23
Copy link

1s23 commented Jun 22, 2022

`Error executing job with overrides: ['+experiments=dd3d_kitti_dla34_overfit', 'EVAL_ONLY=True', 'MODEL.CKPT=/home/cgim/yyh/github/dd3d/model_final.pth', 'TEST.IMS_PER_BATCH=4']
Traceback (most recent call last):
File "./scripts/train.py", line 60, in main
test_results = do_test(cfg, model, is_last=True)
File "./scripts/train.py", line 232, in do_test
per_dataset_results = inference_on_dataset(model, dataloader, evaluator)
File "/home/cgim/anaconda3/envs/yyh/lib/python3.6/site-packages/detectron2/evaluation/evaluator.py", line 158, in inference_on_dataset
outputs = model(inputs)
File "/home/cgim/anaconda3/envs/yyh/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/core.py", line 121, in forward
fcos2d_info
File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/fcos3d.py", line 327, in call
pred_instances[lvl], fcos2d_info[lvl]
File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/fcos3d.py", line 408, in forward_for_single_feature_map
depth_is_distance=self.predict_distance
File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/fcos3d.py", line 48, in predictions_to_boxes3d
quat = allocentric_to_egocentric(quat, proj_ctr, inv_intrinsics)
File "/home/cgim/yyh/github/dd3d/tridet/utils/geometry.py", line 47, in allocentric_to_egocentric
egocentric_quat = matrix_to_quaternion(R_obj_to_global)
File "/home/cgim/anaconda3/envs/yyh/lib/python3.6/site-packages/pytorch3d/transforms/rotation_conversions.py", line 151, in matrix_to_quaternion
F.one_hot(q_abs.argmax(dim=-1), num_classes=4) > 0.5, : # pyre-ignore[16]
RuntimeError: cannot perform reduction function argmax on a tensor with no elements because the operation does not have an identity

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.`

Can you tell me how to solve this problem? When I use this model I get an error like this

截图_20220622204726

@chegnyanjun
Copy link

@1s23 hi, I met the same problem, Do you have solved it now?

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

2 participants