zhu-xlab / DOFA

Code for Neural Plasticity-Inspired Foundation Model for Observing the Earth Crossing Modalities
MIT License
84 stars 5 forks source link

An error about TransformerWeightGenerator #9

Closed Jack-bo1220 closed 5 months ago

Jack-bo1220 commented 5 months ago

encoder_layer = nn.TransformerEncoderLayer( TypeError: init() got an unexpected keyword argument 'norm_first'

This will show an error after I delete it:

transformer_output = self.transformer_encoder(x) tgt_len, bsz, embed_dim = query.size() ValueError: not enough values to unpack (expected 3, got 2

I found that the shape of x in “transformer_output = self.transformer_encoder(x)” is torch.Size([132, 128])

Jack-bo1220 commented 5 months ago

This seems to be highly related to the torch version, could you tell me the torch version used for the implementation?

moonboy12138 commented 5 months ago

I tried 2.0.1+cu117 and it worked smoothly

Jack-bo1220 commented 5 months ago

I got it. thank you so much