WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 576 forks source link

ScaledYOLOv4 does not run on colab anymore #193

Open irisiii opened 3 years ago

irisiii commented 3 years ago

Hi there, i'm new here and started to work with ScaledYolov4 on google colab with pytorch 1.8.0+cu111. Since one day the training won't run anymore, i get the following error massage even with the default settings from the notebook:

Traceback (most recent call last): File "train.py", line 443, in train(hyp, opt, device, tb_writer) File "train.py", line 72, in train model = Model(opt.cfg, ch=3, nc=nc).to(device)# create File "/content/ScaledYOLOv4/models/yolo.py", line 83, in init self._initialize_biases() # only run once File "/content/ScaledYOLOv4/models/yolo.py", line 141, in _initialize_biases b[:, 4] += math.log(8 / (640 / s) ** 2) # obj (8 objects per 640 image) RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation

Does anyone know how to start the training again?

cyrilzakka commented 3 years ago

Please see here: https://github.com/WongKinYiu/ScaledYOLOv4/issues/191#issuecomment-794515711

Sylvia-Vee commented 3 years ago

Please see here: #191 (comment)

my local code is same as this issue commented, but still got this error

rkinas commented 3 years ago

Downgrade pytorch to 1.7 !pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html