Thank you very much for the information!
I think I will open a new topic about optimizing the nested loop in pytorch version.
If you can recall the name of the mentioned library please inform me! I’m desperately short in time for my college graduation project. Any help would definitely mean a huge favor to me! Thank you!!!