Skip to main content

Unified API for machine learning

Project description

ΦML

🌐 Homepage   •   📖 Documentation   •   🔗 API   •   ▶ Videos   •   Examples

ΦML provides a unified math and neural network API for Jax, PyTorch, TensorFlow and NumPy.

See the installation Instructions on how to compile the optional custom CUDA operations.

from jax import numpy as jnp
import torch
import tensorflow as tf
import numpy as np

from phiml import math

math.sin(1.)
math.sin(jnp.asarray([1.]))
math.sin(torch.tensor([1.]))
math.sin(tf.constant([1.]))
math.sin(np.asarray([1.]))

Compatibility

  • Writing code that works with PyTorch, Jax, and TensorFlow makes it easier to share code with other people and collaborate.
  • Your published research code will reach a broader audience.
  • When you run into a bug / roadblock with one library, you can simply switch to another.
  • ΦML can efficiently convert tensors between ML libraries on-the-fly, so you can even mix the different ecosystems.

Fewer mistakes

Unique features

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phiml-1.5.1.tar.gz (284.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page