Skip to main content

Lorentz Boost Network (LBN) Build Status Package Status

TensorFlow implementation of the Lorentz Boost Network from arXiv:1812.09722 [hep-ex].

LBN architecture

Usage example

import tensorflow as tf
from lbn import LBN

# initialize the LBN, set 10 combinations and pairwise boosting
lbn = LBN(10, boost_mode=LBN.PAIRS)

# create a feature tensor based on input four-vectors
features = lbn(four_vectors)

# use the features as input for a subsequent, application-specific network
...

Or with TensorFlow 2 and Keras:

import tensorflow as tf
from lbn import LBN, LBNLayer

# start a sequential model
model = tf.keras.models.Sequential()

# add the LBN layer
input_shape = (6, 4)
model.add(LBNLayer(input_shape, 10, boost_mode=LBN.PAIRS))

# add a dense layer
model.add(tf.keras.layers.Dense(1024))

# continue builing and training the model
...

For more examples on how to set up the LBN with TensorFlow (eager mode and autograph / tf.function ) and Keras, see this gist.

Installation and dependencies

Via pip:

pip install lbn

NumPy and TensorFlow are the only dependencies. Both TensorFlow v1 and v2 are supported.

Testing

Tests should be run for Python 2 and 3 and for TensorFlow 1 and 2. The following commands assume you are in the root directory of the LBN respository:

python -m unittest test

# or via docker
for tag in 1.15.2 1.15.2-py3 2.1.0 2.2.0; do
    docker run --rm -v `pwd`:/root/lbn -w /root/lbn tensorflow/tensorflow:$tag python -m unittest test
done

Contributing

If you like to contribute, we are happy to receive pull requests. Just make sure to add new test cases and run the tests. Also, please use a coding style that is compatible with our .flake8 config.

Development

Release files for lbn 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lbn 1.2.2
File Size Uploaded
lbn-1.2.2.tar.gz 13.5 kB Details

Release files / lbn-1.2.2.tar.gz

Download URL lbn-1.2.2.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
81e91cdad14817f666c8575a7136d5e43757d182937e03b68dcce39fc5e724d3
BLAKE2b-256 checksum
How to use checksums
c4ca9460f03f334fe278b4f9d3c127133a0c683bb2deceda00c702a85888e6b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.9

Release history Release notifications | RSS feed

This release

1.2.2 This release

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page