Tensor utilities, reinforcement learning, and more! Designed to make research easier with low-level abstractions for common operations.
For the top-level utilities, import like so:
import pyoneer as pynr
pynr.math.rescale(...)
For the larger sub-modules, such as reinforcement learning, we recommend:
import pyoneer.rl as pyrl
loss_fn = pyrl.losses.PolicyGradient(...)
In general, the Pyoneer API tries to adhere to the TensorFlow 2.0 API.
Activations (pynr.activations)
pynr.activations.swish
Debugging (pynr.debugging)
pynr.debugging.Stopwatch
Distributions (pynr.distributions)
pynr.distributions.MultiCategorical
Initializers (pynr.initializers)
pynr.initializers.SoftplusInverse
Layers (pynr.layers)
pynr.layers.Swishpynr.layers.OneHotEncoderpynr.layers.AngleEncoderpynr.layers.Nestpynr.layers.ConcreteDropout
Tensor Manipulation (pynr.manip)
pynr.manip.flattenpynr.manip.batched_indexpynr.manip.pad_or_truncatepynr.manip.shift
Math (pynr.math)
pynr.math.to_radianspynr.math.to_degreespynr.math.to_cartesianpynr.math.to_polarpynr.math.RADIANS_TO_DEGREESpynr.math.DEGREES_TO_RADIANSpynr.math.isclosepynr.math.safe_dividepynr.math.rescalepynr.math.normalizepynr.math.denormalizepynr.math.sigmoid_inverse
Metrics (pynr.metrics)
pynr.metrics.mapepynr.metrics.smapepynr.metrics.MAPEpynr.metrics.SMAPE
Moments (pynr.moments)
pynr.moments.range_momentspynr.moments.StaticMomentspynr.moments.StreamingMomentspynr.moments.ExponentialMovingMoments
Learning Rate Schedules (pynr.schedules)
pynr.schedules.CyclicSchedule
Regularizers (pynr.regularizers)
pynr.regularizers.DropoutL2
Reinforcement Learning (pynr.rl)
Utilities for reinforcement learning.
Losses (pynr.rl.losses)
pynr.rl.losses.policy_gradientpynr.rl.losses.policy_entropypynr.rl.losses.clipped_policy_gradientpynr.rl.losses.PolicyGradientpynr.rl.losses.PolicyEntropypynr.rl.losses.ClippedPolicyGradient
Targets (pynr.rl.targets)
pynr.rl.targets.DiscountedReturnspynr.rl.targets.GeneralizedAdvantages
Strategies (pynr.rl.strategies)
pynr.rl.strategies.EpsilonGreedypynr.rl.strategies.Modepynr.rl.strategies.Sample
Wrappers (pynr.rl.wrappers)
pynr.rl.wrappers.ObservationCoordinatespynr.rl.wrappers.ObservationNormalizationpynr.rl.wrappers.Batchpynr.rl.wrappers.Process
There are a few options for installation:
-
(Recommended) Install with
pipenv:pipenv install fomoro-pyoneer -
Install locally for development with
pipenv:git clone https://github.com/fomorians/pyoneer.git cd pyoneer pipenv install pipenv shell
There are a few options for testing:
-
Run all tests:
python -m unittest discover -bfp '*_test.py' -
Run specific tests:
python -m pyoneer.math.logical_ops_test
File an issue following the ISSUE_TEMPLATE. If the issue discussion warrants implementation, then submit a pull request from a branch describing the feature. This will eventually get merged into master after a few rounds of code review.