Megvii-BaseDetection / BEVDepth

Official code for BEVDepth.
MIT License
730 stars 101 forks source link

precision mode #106

Closed Like2021 closed 1 year ago

Like2021 commented 1 year ago

my version is: python 3.7 cuda 11.3 torch==1.9.0+cu111 torchvision==0.10.0+cu111 pytorch-lightning: 1.6.0 mmcv-full 1.7.0 mmdet 2.25.3 mmdet3d 1.0.0rc5 mmsegmentation 0.29.1

i used bev_depth_fusion_lss_r50_256x704_128x128_24e.py and set precision=16, but still got this #error.14 eg: parser.set_defaults(profiler='simple', deterministic=False, max_epochs=24, accelerator='ddp', num_sanity_val_steps=0, gradient_clip_val=5, limit_val_batches=0, enable_checkpointing=True, precision=16, default_root_dir=os.path.join('./outputs/', exp_name))

i found that when building the model "precision" of the args still is 16, image

but after building the model, like this: image

then trainer = pl.Trainer.from_argparse_args(args) will return i used "bf16", like this: image

Do you have any good suggestions besides modifying the version of torch?

Obviously, I didn't change the precision mode.