Commit 370ccbdc authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Consider freeze_backbone when building Panoptic Mask RCNN model

PanopticMaskRCNNTask inherits MaskRCNNTask, but didn't implement freeze_backbone.

PiperOrigin-RevId: 475928827
parent 5e8370ca
......@@ -57,6 +57,10 @@ class PanopticMaskRCNNTask(maskrcnn.MaskRCNNTask):
input_specs=input_specs,
model_config=self.task_config.model,
l2_regularizer=l2_regularizer)
if self.task_config.freeze_backbone:
model.backbone.trainable = False
return model
def initialize(self, model: tf.keras.Model) -> None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment