-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hello OccDepth developers,
I am experiencing a dimension mismatch issue while working with models/unet2d.py.
Here is a brief description of the issue: Dimension mismatch arises when I set the parameter backbone_2d_name="tf_efficientnet_b5_ns". At this point, whether or not the decoder is used, a dimension mismatch error occurs.
I found that the error originated from these few lines of code:
"tf_efficientnet_b5_ns": [3, 32, 40, 64, 176],
self.resize_output_1_1 = nn.Conv2d(3, out_feature, kernel_size=1)
self.resize_output_1_2 = nn.Conv2d(32, out_feature * 2, kernel_size=1)
self.resize_output_1_4 = nn.Conv2d(48, out_feature * 4, kernel_size=1)
After examining the network structure of efficientnet_b5, I found some dimension definition errors in unet2d.py. I have corrected these errors as follows:
"tf_efficientnet_b5_ns": [3, 24, 40, 64, 176]
self.resize_output_1_1 = nn.Conv2d(MODEL_CHANNELS[self.backbone_2d_name][0], out_feature, kernel_size=1) self.resize_output_1_2 = nn.Conv2d(MODEL_CHANNELS[self.backbone_2d_name][1], out_feature * 2, kernel_size=1) self.resize_output_1_4 = nn.Conv2d(MODEL_CHANNELS[self.backbone_2d_name][2], out_feature * 4, kernel_size=1)
If you encounter these problems, I hope it can help you.