arogozhnikov / einops

Flexible and powerful tensor operations for readable and reliable code (for pytorch, jax, TF and others)
https://einops.rocks
MIT License
8.41k stars 350 forks source link

Error when using Pytorch==1.9.1, propose change from torch.concat to torch.cat #237

Closed jmoso13 closed 1 year ago

jmoso13 commented 1 year ago

https://github.com/arogozhnikov/einops/blob/05a86433d5be1a86ffc3c5a61a9e256360cb2e0a/einops/_backends.py#L307

I'm using an older version of PyTorch and according to their documentation torch.concat is just a newer alias for still supported torch.cat, I'm getting an error AttributeError: module 'torch' has no attribute 'concat' , was wondering if this line above could just be changed to torch.cat safely? Thank you!

arogozhnikov commented 1 year ago

good point, changed to torch.cat, try version that is currently in master

jmoso13 commented 1 year ago

works great, thank you!