amazon-science / earth-forecasting-transformer

Official implementation of Earthformer
Apache License 2.0
359 stars 61 forks source link

Fix bug in hierarchical pos embed #51

Closed gaozhihan closed 1 year ago

gaozhihan commented 1 year ago

Fix the bug in the hierarchical positional embeddings of the cuboid transformer decoder mentioned by #49:

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

Setting maxT=self.mem_shapes[i][0] leads to error when T_in < T_out.