-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
save weights error #12
Comments
I have same error. |
You should load a pretrained weights such as yolov3.weights first in train.py. |
@nationalflag Could you write the code ? I didnt understand. thanks ! |
model = Darknet(opt.model_config_path) Darknet.seen is assigned in load_weights |
Hi, this is fixed in 6727086. You don't have to load pretrained weights to be able to save the weights of the model during training with this commit. |
Hey can the save darknet weights function in models.py be used to save the weights in pytorch format ,i.e with the extension .pt ,or how is that function used? |
Traceback (most recent call last):
File "train.py", line 108, in
model.save_weights('%s/%d.weights' % (opt.checkpoint_dir, epoch))
File "F:\cmp\VehicleDetection\PyTorch-YOLOv3\models.py", line 306, in save_weights
self.header_info[3] = self.seen
File "D:\software\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 532, in getattr
type(self).name, name))
AttributeError: 'Darknet' object has no attribute 'seen'
The text was updated successfully, but these errors were encountered: