Skip to content

Commit

Permalink
clean up text tokens long
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Aug 9, 2023
1 parent 1afa2a8 commit a362665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions palme/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def __init__(self):
def forward(self, text_tokens, images):
try:
# if text_tokens.dtype != torch.long:
# text_tokens = text_tokens.long()

text_tokens = text_tokens.long()
images = self.vit_model(pixel_values=images)["last_hidden_state"]
print(images.shape)
images = self.perceive(images).squeeze(1)
Expand Down
1 change: 1 addition & 0 deletions palme/palm.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ def generate(

return out[..., n:]


def forward(
self,
x,
Expand Down

0 comments on commit a362665

Please sign in to comment.