ImportError: cannot import name “xx” /self.models_module = import_module(models_module_name)

项目背景:

Python2.7到3.6完美升级 强力django+杀手级xadmin

完善一下数据库表,添加了新的类。

报错如下:

分析如下:

可能是因为---存在多个文件相互调用类。

尝试解决:

于是我就把互相调用类的删除,或者移到其他地方,当然还有很多细节要处理,

然后就可以了。

Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.) return torch._C._cuda_getDeviceCount() > 0 FlashAttention is not available on this device. Using scaled_dot_product_attention instead. Ultralytics 8.3.63 🚀 Python-3.11.11 torch-2.2.2+cu121 CPU (Intel Core(TM) i7-9750H 2.60GHz) YOLOv12n summary (fused): 352 layers, 2,590,824 parameters, 0 gradients Found https://ultralytics.com/images/bus.jpg locally at bus.jpg Traceback (most recent call last): File "/home/zhangchong/anaconda3/envs/yolov12/bin/yolo", line 8, in <module> sys.exit(entrypoint()) ^^^^^^^^^^^^ File "/home/zhangchong/yolov12/ultralytics/cfg/__init__.py", line 983, in entrypoint getattr(model, mode)(**overrides) # default args from model ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/zhangchong/yolov12/ultralytics/engine/model.py", line 560, in predict return self.predictor.predict_cli(source=source) if is_cli else self.predictor(source=source, stream=stream) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/zhangchong/yolov12/ultralytics/engine/predictor.py", line 188, in predict_cli for _ in gen: # sourcery skip: remove-empty-nested-block, noqa File "/home/zhangchong/anaconda3/envs/yolov12/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 35, in generator_context response = gen.send(None) ^^^^^^^^^^^^^^ File "/home/zhangchong/yolov12/ultralytics/engine/predictor.py", line 259, in stream_inference preds = self.inference(im, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/zhangchong/yolov12/ultralytics/engine/predictor.py", line 143, in inference return self.model(im, augment=self.args.augment, visualize=v
03-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值