Deepstack Trainer RuntimeError: a view of a leaf Variable

Hello! I’m trying to use the Deepstack Trainer and after testing it on the dataset provided in the DeepStack v1.2.1 documentation in Windows and the GoogleColab environment I receive the following error. I cannot find anything about this if anyone can point me in the right direction that would be wonderful.

Traceback (most recent call last):
File “C:\Users\Administrator\deepstack-trainer\train.py”, line 530, in
train(hyp, opt, device, tb_writer, wandb)
File “C:\Users\Administrator\deepstack-trainer\train.py”, line 90, in train
model = Model(opt.cfg or ckpt[‘model’].yaml, ch=3, nc=nc).to(device) # create
File “C:\Users\Administrator\deepstack-trainer\models\yolo.py”, line 96, in init
self._initialize_biases() # only run once
File “C:\Users\Administrator\deepstack-trainer\models\yolo.py”, line 151, 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.

Thank you for any help!!

I have removed my topic thread as it was a duplicate to this one, but I am also experiencing the exact same error.

Ben

Me, too. It has worked before 5 times. Same commands, just a few more pics.

It will run locally, but my video card is really weak.

I ended up getting it to work finally by running this command after installing the requirements for Deepstack trainer. This installs torch 1.6.0

!pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html

Would be nice to use the newest version, but this works for now.

2 Likes

Ad3t0 - Your talking about a local install right? But we are getting the error with Google Colab on the cloud.

I have the same error regardless but in Colab it works for me successfully if I run that line after installing the requirements.

1 Like

Awesome! It’s working for me too, thanks so much Ad3t0 :slight_smile: