Traceback (most recent call last):


 "demo.py", line 82, in <module>

demo = VisualizationDemo(cfg)


 "/media/disk1/03_Al_Group/HCL/project-python/detectron2/demo/predictor.py", line 35, in __init__

self.predictor = DefaultPredictor(cfg)


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/detectron2/engine/defaults.py", line 216, in __init__

self.model = build_model(self.cfg)


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/detectron2/modeling/meta_arch/build.py", line 22, in build_model

model.to(torch.device(cfg.MODEL.DEVICE))


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/torch/nn/modules/module.py", line 673, in to

return self._apply(convert)


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply

module._apply(fn)


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply

module._apply(fn)


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/torch/nn/modules/module.py", line 409, in _apply

param_applied = fn(param)


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/torch/nn/modules/module.py", line 671, in convert

return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)


 "/home/huangchaolin/anaconda3/envs/pytorch1.8.0/lib/python3.6/site-packages/torch/cuda/__init__.py", line 170, in _lazy_init

torch._C._cuda_init()
RuntimeError: CUDA driver initialization failed, you might not have a CUDA gpu.

Traceback (most recent call last):


 "train.py", line 576, in <module>

model, model_bert, tokenizer, bert_config = get_models(args, BERT_PT_PATH)


 "train.py", line 156, in get_models

args.no_pretraining)


 "train.py", line 126, in get_bert

model_bert.to(device)


 "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 386, in to

return self._apply(convert)


 "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 193, in _apply

module._apply(fn)


 "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 193, in _apply

module._apply(fn)


 "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 199, in _apply

param.data = fn(param.data)


 "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 384, in convert

return t.to(device, dtype if t.is_floating_point() else None, non_blocking)
RuntimeError: CUDA error: out of memory
