According to the Fig.5 in paper, it shows that using sigmoid in SAM block, but in the config file it seems that mish is used.
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L122
Hello,
Provided yolov4.cfg does not have SAM block.

an example of SAM block is as follow:
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=512
activation=mish
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=logistic
[sam]
from=-2
thank you so is this part in cfg is WRC?
No, Mish is just an activation function.
For more information about WRC, you can take a look https://github.com/AlexeyAB/darknet/issues/4662.
I know mish is an activation.
I compared yolov4 cfg with yolov3 ,and found there are some different in backbone's structure. If those diff is not WRC, is it CSP?
Besides, modified pan seems not in this cfg as well.
yes, the backbone is csp.
CSPDarknet53:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L30-L745
PAN:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L747-L1155
top-down nodes of PAN:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L829-L841
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L894-L906
bottom-up nodes of PAN:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L994-L995
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L1081-L1082
thank you so much
Hi @AlexeyAB where to find this cfg file yolov4-sam-mish.cfg
Hi @WongKinYiu Thanks. I would like to ask how to implement conv_lstm in yolov4?
Most helpful comment
yes, the backbone is csp.
CSPDarknet53:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L30-L745
SPP:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L771-L792
PAN:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L747-L1155
top-down nodes of PAN:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L829-L841
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L894-L906
bottom-up nodes of PAN:
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L994-L995
https://github.com/AlexeyAB/darknet/blob/6033baabc9d646b23d8dbdb21cf84663910dca60/cfg/yolov4-custom.cfg#L1081-L1082