Open ngreenwald opened 3 years ago
I can reproduce the errors on both ResNetV2 and ResNext.
I am not sure why we are seeing the problem with ResNext, it's failing to instantiate the model using its own pre-trained weights. Looking into TF2.3 to see if there were any future bugfixes, I notice that ResNext is not supported.
ResNetV2
works as expected when using upsample_type = 'upsamplelike'
.
When we create_pyramid_level
creates pyramid upsamples that are an unexpected shape when using upsampling2d
, specifically we are adding the following layers:
Tensor("conv4_block23_out/add:0", shape=(?, 4, 4, 1024), dtype=float32)
Tensor("P5_upsampled_1/ResizeBilinear:0", shape=(?, 8, 8, 256), dtype=float32)
However when using "upsamplelike"
, the upsampled tensor looks like:
Tensor("P5_upsampled_1/resize/ResizeNearestNeighbor:0", shape=(?, ?, ?, 256), dtype=float32)
UpsampleLike keeps the x and y dimensions undefined, which allows us to add these features together.
Describe the bug While trying out some of the other backbones available, I'm running into issues with ResNext and ResNetV2 backbones. The ResNext backbones are loaded without any errors, but using the ImageNet weights fails.
The ResNetV2 backbones can't be loaded at all.
To Reproduce Attempting to use ResNetV2 like this
Produces the following:
Attempting to use ResNext like this:
Produces the following: