pytorch-auto-drive icon indicating copy to clipboard operation
pytorch-auto-drive copied to clipboard

训练时出错:TypeError: <module 'torch' from '/root/miniconda3/envs/pad2/lib/python3.6/site-packages/torch/__init__.py'> is not JSON serializable

Open Yuanxing-he opened this issue 1 year ago • 3 comments

Traceback (most recent call last): File "main_landet.py", line 75, in runner = Runner(cfg=cfg) File "/root/pytorch-auto-drive-3.2.3/utils/runners/lane_det_trainer.py", line 17, in init super().init(cfg) File "/root/pytorch-auto-drive-3.2.3/utils/runners/base.py", line 120, in init self.init_exp_dir(cfg, 'train') File "/root/pytorch-auto-drive-3.2.3/utils/runners/base.py", line 93, in init_exp_dir f.write(json.dumps(cfg, indent=4)) TypeError: <module 'torch' from '/root/miniconda3/envs/pad2/lib/python3.6/site-packages/torch/init.py'> is not JSON serializable

Yuanxing-he avatar Jul 21 '24 04:07 Yuanxing-he

Traceback (most recent call last): File "main_landet.py", line 75, in runner = Runner(cfg=cfg) File "/root/pytorch-auto-drive-3.2.3/utils/runners/lane_det_trainer.py", line 17, in init super().init(cfg) File "/root/pytorch-auto-drive-3.2.3/utils/runners/base.py", line 120, in init self.init_exp_dir(cfg, 'train') File "/root/pytorch-auto-drive-3.2.3/utils/runners/base.py", line 93, in init_exp_dir f.write(json.dumps(cfg, indent=4)) TypeError: <module 'torch' from '/root/miniconda3/envs/pad2/lib/python3.6/site-packages/torch/init.py'> is not JSON serializable

@Yuanxing-he 有运行的指令不,我看下

voldemortX avatar Jul 21 '24 04:07 voldemortX

python main_landet.py --train --config="/root/pytorch-auto-drive-3.2.3/configs/lane_detection/scnn/vgg16_culane.py" --mixed-precision @voldemortX

Yuanxing-he avatar Jul 21 '24 09:07 Yuanxing-he

python main_landet.py --train --config="/root/pytorch-auto-drive-3.2.3/configs/lane_detection/scnn/vgg16_culane.py" --mixed-precision @voldemortX

感觉很奇怪。你的torch是正常能用的吗?

voldemortX avatar Jul 21 '24 10:07 voldemortX