Hi:
Great work! But I think in line 84 of yolo.py, the shape of anchors should be [self.num_scale, -1, 2], instead of [self.num_anchors, -1, 2]. Coincidentally self.num_scale is equal to self.num_anchors in configurations.
https://github.com/LongxingTan/Yolov5/blob/88acfd988decc4cc78335cfb6eb50f1975294c1f/yolo/model/yolo.py#L84