Skip to content

Commit

Permalink
TF SAM memory reduction (huggingface#23732)
Browse files Browse the repository at this point in the history
* Extremely small change to TF SAM dummies to reduce memory usage on build

* remove debug breakpoint

* Debug print statement to track array sizes

* More debug shape printing

* More debug shape printing

* Now remove the debug shape printing

* make fixup

* make fixup
  • Loading branch information
Rocketknight1 authored and gojiteji committed Jun 5, 2023
1 parent 583ea96 commit 96a9896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/sam/modeling_tf_sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def dummy_inputs(self) -> Dict[str, tf.Tensor]:
"""
VISION_DUMMY_INPUTS = tf.random.uniform(
shape=(
3,
1,
self.config.vision_config.num_channels,
self.config.vision_config.image_size,
self.config.vision_config.image_size,
Expand Down

0 comments on commit 96a9896

Please sign in to comment.