RuntimeError: Given groups=1, weight of size [8, 1024, 1, 1], expected input[8, 304, 9, 40] to have 1024 channels, but got 304 channels instead
下面是我如何改变脊梁的方法:
代码语言:
javascript
复制
class YoloStereo3DCore(nn.Module):
Inference Structure of YoloStereo3D
Similar to YoloMono3D,
Left and Right image are fed into the backbone in batch. So they will affect each other with BatchNorm2d.
def __init__(self, backbone_arguments):
f = open("/home/zakaseb/Thesis/YoloStereo3D/Stereo3D/Sequence.txt", "a")
f.write("yolosterero3dCore_init \n")
f.close()
super(YoloStereo3DCore, self).__init__()
self.backbone =edgenext_small(**backbone_arguments) # Resnet, change backbone from here
base_features = 256 #if backbone_arguments['depth'] > 34 else 64 # meaning which depth of resnet
self.neck = StereoMerging(base_features) #stereomerging outputs features and depth output.