Commit 35c3a79f authored by Srihari Humbarwadi's avatar Srihari Humbarwadi Committed by Jaeyoun Kim
Browse files

fixed linting errors (#10053)

parent b3be14bc
...@@ -119,7 +119,7 @@ class PanopticMaskRCNNModel(maskrcnn_model.MaskRCNNModel): ...@@ -119,7 +119,7 @@ class PanopticMaskRCNNModel(maskrcnn_model.MaskRCNNModel):
**kwargs) **kwargs)
self._config_dict.update({ self._config_dict.update({
'segmentation_backbone':segmentation_backbone, 'segmentation_backbone': segmentation_backbone,
'segmentation_decoder': segmentation_decoder, 'segmentation_decoder': segmentation_decoder,
'segmentation_head': segmentation_head 'segmentation_head': segmentation_head
}) })
...@@ -129,7 +129,8 @@ class PanopticMaskRCNNModel(maskrcnn_model.MaskRCNNModel): ...@@ -129,7 +129,8 @@ class PanopticMaskRCNNModel(maskrcnn_model.MaskRCNNModel):
'`mask_head` needs to be provided for Panoptic Mask R-CNN.') '`mask_head` needs to be provided for Panoptic Mask R-CNN.')
if segmentation_backbone is not None and segmentation_decoder is None: if segmentation_backbone is not None and segmentation_decoder is None:
raise ValueError( raise ValueError(
'`segmentation_decoder` needs to be provided for Panoptic Mask R-CNN if `backbone` is not shared.' '`segmentation_decoder` needs to be provided for Panoptic Mask R-CNN'\
'if `backbone` is not shared.'
) )
self.segmentation_backbone = segmentation_backbone self.segmentation_backbone = segmentation_backbone
......
...@@ -23,7 +23,8 @@ import tensorflow as tf ...@@ -23,7 +23,8 @@ import tensorflow as tf
from tensorflow.python.distribute import combinations from tensorflow.python.distribute import combinations
from tensorflow.python.distribute import strategy_combinations from tensorflow.python.distribute import strategy_combinations
from official.vision.beta.projects.panoptic_maskrcnn.modeling import panoptic_maskrcnn_model from official.vision.beta.projects.panoptic_maskrcnn.modeling import \
panoptic_maskrcnn_model
from official.vision.beta.modeling.backbones import resnet from official.vision.beta.modeling.backbones import resnet
from official.vision.beta.modeling.decoders import fpn from official.vision.beta.modeling.decoders import fpn
from official.vision.beta.modeling.decoders import aspp from official.vision.beta.modeling.decoders import aspp
...@@ -316,8 +317,7 @@ class PanopticMaskRCNNModelTest(parameterized.TestCase, tf.test.TestCase): ...@@ -316,8 +317,7 @@ class PanopticMaskRCNNModelTest(parameterized.TestCase, tf.test.TestCase):
self.assertIn('detection_masks', results) self.assertIn('detection_masks', results)
self.assertIn('segmentation_outputs', results) self.assertIn('segmentation_outputs', results)
self.assertAllEqual( self.assertAllEqual(
[2, [2, image_size[0] // (2**level),
image_size[0] // (2**level),
image_size[1] // (2**level), 2], image_size[1] // (2**level), 2],
results['segmentation_outputs'].numpy().shape) results['segmentation_outputs'].numpy().shape)
......
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