deep-high-resolution-net.pytorch
deep-high-resolution-net.pytorch copied to clipboard
Invalid value encountered in greater pred_mask = np.tile(np.greater(maxvals, 0.0), (1, 1, 2))
thanks for your greate work. I have met a problem. When I finished training the model and used the valid set for the test, the following errors appeared. Could you help me
/home/orange/PycharmProjects/HRnet/tools/../lib/core/inference.py:42: RuntimeWarning: invalid value encountered in greater
pred_mask = np.tile(np.greater(maxvals, 0.0), (1, 1, 2))
=> writing results json to output/coco/efficientnet/efficientnet_mul_256x256_d256x3_adam_lr1e-3/results/keypoints_val2017_results_0.json
Traceback (most recent call last):
File "tools/train.py", line 235, in <module>
main()
File "tools/train.py", line 205, in main
final_output_dir, tb_log_dir, writer_dict
File "/home/orange/PycharmProjects/HRnet/tools/../lib/core/function.py", line 206, in validate
filenames, imgnums
File "/home/orange/PycharmProjects/HRnet/tools/../lib/dataset/coco.py", line 359, in evaluate
oks_nmsed_kpts, res_file)
File "/home/orange/PycharmProjects/HRnet/tools/../lib/dataset/coco.py", line 383, in _write_coco_keypoint_results
json.dump(results, f, sort_keys=True, indent=4)
File "/home/orange/.conda/envs/orange_env/lib/python3.6/site-packages/json_tricks/nonp.py", line 128, in dump
fallback_encoders=fallback_encoders, **jsonkwargs)
File "/home/orange/.conda/envs/orange_env/lib/python3.6/site-packages/json_tricks/nonp.py", line 99, in dumps
primitives=primitives, fallback_encoders=fallback_encoders, **jsonkwargs).encode(obj)
File "/home/orange/.conda/envs/orange_env/lib/python3.6/json/encoder.py", line 201, in encode
chunks = list(chunks)
File "/home/orange/.conda/envs/orange_env/lib/python3.6/json/encoder.py", line 428, in _iterencode
yield from _iterencode_list(o, _current_indent_level)
File "/home/orange/.conda/envs/orange_env/lib/python3.6/json/encoder.py", line 325, in _iterencode_list
yield from chunks
File "/home/orange/.conda/envs/orange_env/lib/python3.6/json/encoder.py", line 404, in _iterencode_dict
yield from chunks
File "/home/orange/.conda/envs/orange_env/lib/python3.6/json/encoder.py", line 316, in _iterencode_list
yield buf + _floatstr(value)
File "/home/orange/.conda/envs/orange_env/lib/python3.6/json/encoder.py", line 241, in floatstr
repr(o))
ValueError: Out of range float values are not JSON compliant: -inf
I got the same error. Do you solve this problem?