Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorFlow backend #3

Open
henryiii opened this issue Feb 14, 2020 · 6 comments
Open

TensorFlow backend #3

henryiii opened this issue Feb 14, 2020 · 6 comments
Assignees
Labels
feature New feature or request

Comments

@henryiii
Copy link
Member

Work on TensorFlow backend.

@henryiii henryiii assigned henryiii and jonas-eschle and unassigned henryiii Feb 14, 2020
@jonas-eschle
Copy link
Collaborator

jonas-eschle commented Nov 5, 2020

So finally TF also makes a step into the right direction by having essentially a (limited) numpy API available as well.
TF and PyTorch should therefore have basically the same implementation and may differ from numpy as the former do not allow(TF)/highly discourage(PyTorch) the usage of inplace operations (or assignments to an existing tensor like in Numpy).

The question is somewhat about numpy (and numba): do we expect to have inplace operations in the numpy implementation actually? If not TF, PyTorch and np can be implemented in one way, otherwise TF and PyTorch may need a separate, yet common to both, implementation.

TF does not support the ufuncs though, this would result in a numpy array being returned. It just supports a np.* interface

@henryiii
Copy link
Member Author

henryiii commented Nov 5, 2020

Great! I think the current plan is to avoid in-place operations. Possibly there could be some room for it in the future, but not something we will target in version 1, and maybe never, since the best way to optimize may be to use numba/tf/pytorch.

I'm doing some quick work for the Princeton flowmeter project, then I'll finish a fairly large commit including more functionality and updates.

@henryiii
Copy link
Member Author

henryiii commented Nov 5, 2020

(I'm following the Uproot/awkward deadlines, so an initial release is targeting Dec 1)

@jonas-eschle
Copy link
Collaborator

Great, that's good to hear!Looking forward to it; I'll gladly add the PyTorch/TF backends then

@eduardo-rodrigues
Copy link
Member

Yep, looking forward to seeing what you have been preparing there :-).

@henryiii
Copy link
Member Author

henryiii commented Dec 15, 2020

The Protocol in src/vector/protocols/lorentz.py should help with this, as well as the parametrized tests in tests/test_simple_param.py (static link, will likely rename soon).

@jpivarski jpivarski added the feature New feature or request label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants