Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 713639384
  • Loading branch information
tensorflower-gardener committed Jan 9, 2025
1 parent bab9ebe commit ef9df64
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion official/projects/pix2seq/modeling/pix2seq_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,17 @@ def checkpoint_items(
# For backward-compatibility with prior checkpoints, the first backbone
# should be named "backbone" and the second one should be named
# "backbone_2", etc.
items = dict(backbone=self.backbones[0], transformer=self.transformer)
items = dict(
backbone=self.backbones[0],
transformer=self.transformer,
stem_projection=self._stem_projections[0],
stem_ln=self._stem_lns[0],
)
for i in range(1, len(self.backbones)):
items[f"backbone_{i+1}"] = self.backbones[i]
items[f"stem_projection_{i+1}"] = self._stem_projections[i]
items[f"stem_ln_{i+1}"] = self._stem_lns[i]

return items

def _generate_image_mask(
Expand Down

0 comments on commit ef9df64

Please sign in to comment.