Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 702114784
  • Loading branch information
Martin Huschenbett authored and tensorflower-gardener committed Dec 3, 2024
1 parent aaa62e1 commit 9766fac
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def build(self, input_shape: tf.TensorShape):
name='rf/bottleneck2')
self._batch_norm = build_batch_norm(init_zero=True)

def call(self, inputs: tf.Tensor, training: bool = None) -> tf.Tensor:
def call(self, inputs: tf.Tensor, training: bool = None) -> tf.Tensor: # pytype: disable=annotation-type-mismatch
"""Perform representation flows.
Args:
Expand Down
2 changes: 1 addition & 1 deletion official/projects/centernet/modeling/centernet_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self,
self._detection_generator = detection_generator
self._head = head

def call(self, # pytype: disable=signature-mismatch # overriding-parameter-count-checks
def call(self, # pytype: disable=annotation-type-mismatch,signature-mismatch
inputs: tf.Tensor,
training: bool = None,
**kwargs) -> Mapping[str, tf.Tensor]:
Expand Down
2 changes: 1 addition & 1 deletion official/projects/detr/modeling/detr.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _generate_image_mask(self, inputs: tf.Tensor,
mask, target_shape, method=tf.image.ResizeMethod.NEAREST_NEIGHBOR)
return mask

def call(self, inputs: tf.Tensor, training: bool = None) -> List[Any]: # pytype: disable=signature-mismatch # overriding-parameter-count-checks
def call(self, inputs: tf.Tensor, training: bool = None) -> List[Any]: # pytype: disable=annotation-type-mismatch,signature-mismatch
batch_size = tf.shape(inputs)[0]
features = self._backbone(inputs)[self._backbone_endpoint_name]
shape = tf.shape(features)
Expand Down
2 changes: 1 addition & 1 deletion official/projects/maskconver/modeling/maskconver_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(
self.embedding_size,
embeddings_regularizer=l2_regularizer)

def call(self, inputs: tf.Tensor,
def call(self, inputs: tf.Tensor, # pytype: disable=annotation-type-mismatch
image_info: Optional[tf.Tensor] = None,
box_indices: Optional[tf.Tensor] = None,
classes: Optional[tf.Tensor] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def process_heatmap(self, heatmap: tf.Tensor) -> tf.Tensor:
valid_mask = tf.abs(scoremap - scoremap_max_pool) < 1e-6
return scoremap * tf.cast(valid_mask, scoremap.dtype)

def call(self, inputs: tf.Tensor,
def call(self, inputs: tf.Tensor, # pytype: disable=annotation-type-mismatch
image_info: Optional[tf.Tensor] = None,
box_indices: Optional[tf.Tensor] = None,
classes: Optional[tf.Tensor] = None,
Expand Down
2 changes: 1 addition & 1 deletion official/projects/maxvit/modeling/maxvit.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def _add_absolute_position_encoding(self, inputs: tf.Tensor) -> tf.Tensor:
output = ops.maybe_reshape_to_1d(output)
return output

def call(
def call( # pytype: disable=annotation-type-mismatch
self, inputs: tf.Tensor, mask: Optional[Any] = None, training: bool = None
) -> Mapping[str, tf.Tensor]:
logging.info(
Expand Down
2 changes: 1 addition & 1 deletion official/projects/mosaic/modeling/mosaic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self,
self.head = head
self.mask_scoring_head = mask_scoring_head

def call(self, # pytype: disable=signature-mismatch # overriding-parameter-count-checks
def call(self, # pytype: disable=annotation-type-mismatch,signature-mismatch
inputs: tf.Tensor,
training: bool = None) -> Dict[str, tf.Tensor]:
backbone_features = self.backbone(inputs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
self.instance_head = instance_head
self.post_processor = post_processor

def call( # pytype: disable=signature-mismatch # overriding-parameter-count-checks
def call( # pytype: disable=annotation-type-mismatch,signature-mismatch
self, inputs: tf.Tensor,
image_info: tf.Tensor,
training: bool = None):
Expand Down
4 changes: 2 additions & 2 deletions official/projects/pix2seq/modeling/pix2seq_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def _generate_image_mask(
)
return mask

def call(
def call( # pytype: disable=annotation-type-mismatch
self,
inputs: tf.Tensor,
targets: Optional[tf.Tensor] = None,
Expand Down Expand Up @@ -563,7 +563,7 @@ def encode_sources(
# before passing to decoder.
return tf.concat(encoded_sources, axis=1)

def call(self, inputs: dict[str, tf.Tensor], training: bool = None):
def call(self, inputs: dict[str, tf.Tensor], training: bool = None): # pytype: disable=annotation-type-mismatch
encoded = self.encode_sources(inputs["inputs"], inputs["pos_emb"], training)

targets = inputs["tokens"]
Expand Down
4 changes: 2 additions & 2 deletions official/projects/pointpillars/modeling/featurizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _get_batch_dims(self, batch_size: int) -> tf.Tensor:
batch_dims = tf.expand_dims(batch_dims, axis=-1)
return batch_dims

def _get_batch_size_and_dims(self,
def _get_batch_size_and_dims(self, # pytype: disable=annotation-type-mismatch
training: bool = None) -> Tuple[int, tf.Tensor]:
# We use training as a ternary indicator, None for test mode.
# Test mode will be used for saving model and model inference.
Expand All @@ -125,7 +125,7 @@ def _get_batch_size_and_dims(self,
batch_dims = self._eval_batch_dims
return batch_size, batch_dims

def call(self,
def call(self, # pytype: disable=annotation-type-mismatch
pillars: tf.Tensor,
indices: tf.Tensor,
training: bool = None) -> tf.Tensor:
Expand Down
2 changes: 1 addition & 1 deletion official/projects/pointpillars/modeling/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def generate_outputs(
})
return outputs

def call(self, # pytype: disable=signature-mismatch # overriding-parameter-count-checks
def call(self, # pytype: disable=annotation-type-mismatch,signature-mismatch
pillars: tf.Tensor,
indices: tf.Tensor,
image_shape: Optional[tf.Tensor] = None,
Expand Down
2 changes: 1 addition & 1 deletion official/projects/qat/vision/modeling/layers/nn_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def build(self, input_shape: Union[tf.TensorShape, List[tf.TensorShape]]):

super().build(input_shape)

def call(self, inputs: tf.Tensor, training: bool = None):
def call(self, inputs: tf.Tensor, training: bool = None): # pytype: disable=annotation-type-mismatch
"""Forward pass mask scoring head.
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get_config(self):
base_config = super(BasicBlock3DVolume, self).get_config()
return dict(list(base_config.items()) + list(config.items()))

def call(self, inputs: tf.Tensor, training: bool = None) -> tf.Tensor:
def call(self, inputs: tf.Tensor, training: bool = None) -> tf.Tensor: # pytype: disable=annotation-type-mismatch
"""Runs forward pass on the input tensor."""
x = inputs
for conv, norm in zip(self._convs, self._norms):
Expand Down
2 changes: 1 addition & 1 deletion official/projects/yolo/modeling/yolo_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self,
self._detection_generator = detection_generator
self._fused = False

def call(self,
def call(self, # pytype: disable=annotation-type-mismatch
inputs: tf.Tensor,
training: bool = None,
mask: Any = None) -> Dict[str, tf.Tensor]:
Expand Down
2 changes: 1 addition & 1 deletion official/projects/yolo/modeling/yolov7_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, backbone, decoder, head, detection_generator, **kwargs):
self._fused = False
return

def call(self,
def call(self, # pytype: disable=annotation-type-mismatch
inputs: tf.Tensor,
training: bool = None,
mask: Any = None) -> Dict[str, tf.Tensor]:
Expand Down

0 comments on commit 9766fac

Please sign in to comment.