Open maarten0912 opened 2 years ago
The multi-head attention mechanism creates this error. The scaled small model has too few channels, so that the multi-head attention cannot correctly generate heads. Small models can not use the C3STR module. You may only use the C3TR module at the end of the backbone may help.
I am trying to train the the same model with a smaller network. I use the
yolov5n.pt
from the public repo and I created ayolov5n-xs-tph.yaml
similar toyolov5l-xs-tph.yaml
. It looks like this: (note I only changed the depth and width multiples)Doing exactly this for the yolov5s model worked for me and it trained fine, but with the yolov5n model I get this error:
The error occurs when trying to create a
C3STR
block (# 21). I put these prints in:I know the problem has to do with my
yolov5n-xs-tph.yaml
file, but I don't understand what I should change. Again, foryolov5s-xs-tph.yaml
it worked fine, with depth 0.33 and width 0.5... Any ideas?