Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named 'models.yolo'; 'models' is not a package #13

Open
mary-0830 opened this issue Jul 29, 2020 · 10 comments
Open

Comments

@mary-0830
Copy link

请问,为什么python train.py时,会出现这个错误呢?

@WongKinYiu
Copy link
Owner

WongKinYiu commented Jul 29, 2020

do you delete __init__.py in models folder?

@mary-0830
Copy link
Author

没呀,您发布的代码里也没有models呀?

@WongKinYiu
Copy link
Owner

which branch you used?
and is you command just python train.py?

@mary-0830
Copy link
Author

嗯,是的。命令是python train.py。也已经改了cfg和data里面的文件。

@mary-0830
Copy link
Author

我在train.py里面也修改了epochs,batch_size,cfg,data,weights,name

@WongKinYiu
Copy link
Owner

I can not find any code will use models.yolo.
what are your cfg and weights?

@mary-0830
Copy link
Author

cfg设置的是cfg/yolov4-pacsp.cfg,weights使用的是weights/yolov4-pacsp.pt。报错的地方
是Traceback (most recent call last):
File "train.py", line 409, in
train() # train normally
File "train.py", line 117, in train
chkpt = torch.load(weights, map_location=device)

@mary-0830
Copy link
Author

请问在python 3.5是可以运行的吧?感谢你的回复

@WongKinYiu
Copy link
Owner

if your yolov4-pacsp.pt file is ~100MB, you download wrong file.
please download the yolov4-pacsp.pt file again, it should be ~200MB.

@mary-0830
Copy link
Author

thanks,i will try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants