yolov5自己修改模型配置文件出现以下问题
RuntimeError: Calculated padded input size per channel: (34 x 34).Kernel size: (64 x 64). Kernel size can't be greater than actual input size
RuntimeError: Given groups=1, weight of size [96, 96, 2, 2], expected input[1, 64, 32, 32] to have 96 channels, but got 64 channels instead
yaml配置中,输入通道数会从传入上一个模块输出的通道数,不需要加入该模块的输入参数,上面加入后,传给该模块函数的参数就从6个变成7个了。
解决:把yaml配置文件的输入参数给去掉,模型函数中变量记得对于上配置函数的参数,第一个参数是传入特征图的输入通道数