DALLE2-pytorch icon indicating copy to clipboard operation
DALLE2-pytorch copied to clipboard

How should I get the tensor from a piece of text for a given dataset?

Open QinSY123 opened this issue 2 years ago • 3 comments

In the sample code, the input for the text is a random tensor, how should I get this tensor from a piece of text for a given dataset? text = torch.randint(0, 49408, (4, 256)).cuda()

QinSY123 avatar Nov 02 '22 13:11 QinSY123

Are you using a specific dataset or is this a general approach?

You could use a pre-trained model like BERT for this.

Let me know if that helps!

  • Clerkie (https://clerkie.co/)

krrishdholakia avatar Dec 14 '22 12:12 krrishdholakia

Are you using a specific dataset or is this a general approach?

You could use a pre-trained model like BERT for this.

Let me know if that helps!

  • Clerkie (https://clerkie.co/)

Thanks a lot!

QinSY123 avatar Dec 18 '22 13:12 QinSY123

Hello, have you solved this problem? I have the same problem

xiefei1026 avatar Jan 11 '23 03:01 xiefei1026