Installation¶
Make sure that a CPU or GPU version of TensorFlow 2.0 or later is installed (see this link for installation instructions).
The
focal_loss
package can be installed using the pip utility. For the latest version, install directly from the package’s GitHub page:pip install git+https://github.com/artemmavrin/focal-loss.git
Alternatively, install a recent release from the Python Package Index (PyPI):
pip install focal-loss
Note
To install the project for development (e.g., to make changes to the source code), clone the project repository from GitHub and run
make dev
:git clone https://github.com/artemmavrin/focal-loss.git cd focal-loss # Optional but recommended: create a new Python virtual environment first make dev
This will additionally install the requirements needed to run tests, check code coverage, and produce documentation.