Skip to content

Installation Guide

Paul Haase edited this page Nov 14, 2023 · 10 revisions

Source

The software is hosted at GitHub under: https://github.com/fraunhoferhhi/nncodec

The project can be cloned using:

git clone https://github.com/fraunhoferhhi/nncodec.git

Installation

The software provides python packages which can be installed using pip. However, core technologies are implemented using C++, which requires a C++ compiler for the installation process.

The software has been tested on different target platforms (Windows, Linux and MacOS).

Requirements

  • python >= 3.6 (recommended versions 3.6, 3.7 and 3.8) with working pip
  • Windows: Microsoft Visual Studio 2015 Update 3 or later

Recommendation: For all tools that require training or evaluation of the model on a dataset, is is strongly recommended to use a GPU with CUDA support. Otherwise, these processes are very time consuming!

Package installation

From the root of the cloned repository, issue

pip install wheel
pip install -r requirements.txt
pip install .

and for CUDA11 support

pip install wheel
pip install -r requirements_cu11.txt
pip install .

for installation.

Information: On Linux/Mac the scripts create_env.sh and create_env_cu11.sh (for Cuda 11 support) set up a virtual python environment "env" and install all required packages and the software itself, automatically. For activating this environment, issue:

source env/bin/activate

Note: For further information on how to set up a virtual python environment (also on Windows) refer to https://docs.python.org/3/library/venv.html .

When successfully installed, the software outputs the line : "Successfully installed NNC-0.3.0"

Modules

When installed successfully, the main module and 2 additional modules are available:

Main module:

  • import nnc This main module provides the encoder and decoder functions

Additional modules:

  • import nnc_core This module provides submodules for approximation (quantization) and encoding of the neural network parameters
  • import framework This module provides the model framework for handling of the models, which include access to the models as well as methods for training and evaluation.