desy-ml / cheetah

Fast and differentiable particle accelerator optics simulation for reinforcement learning and optimisation applications.
https://cheetah-accelerator.readthedocs.io
GNU General Public License v3.0
30 stars 13 forks source link

Insert PyTorch histogramdd #10

Closed jank324 closed 1 year ago

jank324 commented 1 year ago

🚀 Feature Request

Used torch.histogramdd instead of custom cheetah.utils.histogramdd.

Motivation

The current implementation was chosen because PyTorch didn't have a histogramdd function at the time. Now that one exists, using it would probably be faster and certainly offer code maintenance advantages.