Skip to content

Commit

Permalink
no encoder cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Aug 17, 2023
1 parent 16bd2c7 commit e6d31a4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions medpalm/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ def forward(self, img, text_tokens, **kwargs):
- output from the decoder
"""
try:
encoded_img = self.encoder(img, return_embeddings=True)
return self.decoder(text_tokens, context=encoded_img)
# encoded_img = self.encoder(img, return_embeddings=True)
# return self.decoder(text_tokens, context=encoded_img)

encoded = self.encoder(img, return_embeddings=True)
return self.decoder(text_tokens, context=encoded)
except Exception as error:
print(f"Failed in forward method: {error}")
raise

0 comments on commit e6d31a4

Please sign in to comment.