amazon-science / earth-forecasting-transformer

Official implementation of Earthformer
Apache License 2.0
349 stars 58 forks source link

PosEmbed bug when the T_out > T_in #49

Open zuliangfang opened 1 year ago

zuliangfang commented 1 year ago

image Here we have to ensure the T <= self.maxT.

But it is not satisfied when the T_out > T_in. so we will get error on PosEmbded of decoder. image Here the self.mem_shape[i][0] = T_in = self.maxT, but the actual T in PosEmbed is T_out. When T_out > T_in, we will get error.

gaozhihan commented 1 year ago

Thank you very much for pointing it out! it's fixed in #51.

https://github.com/amazon-science/earth-forecasting-transformer/blob/0303b37178940dd27acbcb619ffd9c381731a224/src/earthformer/cuboid_transformer/cuboid_transformer.py#L2365-L2369