Thanks a lot for replying but excuse me  i tried to print the model using this code but didn’t work
class Identity(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x):
        return x
PATH = 'mask_rcnn_coco.h5'
model = modellib.MaskRCNN(    )
model.load_weights(PATH)
print(model)

the structure of MAskRcNN is

The-structure-of-the-Mask-R-CNN-architecture_W640640×555 52.5 KB

i need to nn.Identity the classification layer to get the features that help in classify but don’t need to classify it