Open haideraltahan opened 3 weeks ago
@haideraltahan I don't think there is a problem here, looks more likely to be an issue with how model is being used/wrapped in whatever this use case is.
Can do model(torch.randn(2,3,224,224), torch.randint(0, 49408, (2, 76)))
without issue, call text directly ,etc.
Adding context_length=76 should help. Something like this:
text_tokens = tokenizer.tokenize(text_descriptions, context_length=76)
when doing a forward method on a coca model:
model_out = self.model(images, input_texts)
I get an ValueError: too many values to unpack (expected 2) on line 145:
text_latent, token_emb = self.text(text)
Here is full error: