Closed eugene123tw closed 2 years ago
self.bn(torch.cat((y1, y2)
you can use Conv to replace nn.Conv2d and remove self.bn and self.act.
Thank you for the speedy response. However, Batch norm layer after concatenation it's not the same as adding bn layer after each conv layer.
I think we could replace it with ConvBNMish
as you suggested, but in this case, the pre-trained model wouldn't work, right?
In scaled-YOLOv4 or yolov4-csp, each Convolution layer always has a batch normalization layer following. However, this doesn't seem to be the case in this implementation.
For example, in BottleneckCSP, batchnorm layers are missing in both convolution layers
cv2
andcv3
. Even though there's a batchnorm layer after concatenation, it's still not the same as adding batchnorm layer after conv layer.As in https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-csp.cfg, batchnorm layer is always included in a convolution layer (except yolo conv layers).
Did I miss something?