EnergyFlow icon indicating copy to clipboard operation
EnergyFlow copied to clipboard

Torch support?

Open jmontejo opened this issue 1 year ago • 3 comments

Hi, I was considering some ideas with EFP in Pytorch but I get from EFPSet.batch_compute TypeError: arg is not one of numpy.ndarray, list, or fastjet.PseudoJet

Any chance to support also torch.Tensor as input type?

Cheers Javier

jmontejo avatar Jul 09 '23 22:07 jmontejo

Is there a reason you can't just use the .numpy() function to convert to numpy format?

On Jul 9, 2023, at 4:32 PM, Javier Montejo Berlingen @.***> wrote:

Hi, I was considering some ideas with EFP in Pytorch but I get from EFPSet.batch_compute TypeError: arg is not one of numpy.ndarray, list, or fastjet.PseudoJet

Any chance to support also torch.Tensor as input type?

Cheers Javier

— Reply to this email directly, view it on GitHub https://github.com/pkomiske/EnergyFlow/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACT2APREY52EW6A6KZGEROTXPMWRXANCNFSM6AAAAAA2DYNXVU. You are receiving this because you are subscribed to this thread.

jdthaler avatar Jul 09 '23 23:07 jdthaler

Hi, yes I’m using it as part of the loss function so I need the gradientes to be available.

Cheers Javier

jmontejo avatar Jul 10 '23 03:07 jmontejo

Hmm, that sounds more like a research project than a feature request. Let's see if @pkomiske happens to have an autodiff version of EFPs lying around somewhere.

jdthaler avatar Jul 10 '23 05:07 jdthaler