Skip to main content

Python package / GNU Linux terminal utility for porting machine learning algorithms to FPGA.

Project description

MANUAL:

“-t” (training) parameter:

Accepts a string with arguments for training the model.

Training tasks executes in parallel processes. Each training task

generates: “.sv” file for FPGA, “.wd” file and “.tar” archive with model data for prospective classification task.

Training rules:
  1. “training_file.csv” must contain classes in the first column.

  2. “training_file.csv” must not contain a column head.

  3. The character - separator of “training_file.csv” must be “,”.

  4. You can check available training algorithms with option “–info”.

“-c” (classification) parameter:

Accepts a string with arguments for classification the passed data set.

Classification tasks might be executed parallel on several FPGAs.

Several classification tasks, addressed to FPGA, execute consistently. Each classification task generates “.csv” file with predicted answers.

Classification rules:
  1. “classification_file.csv” must not contain a column head.

  2. The character - separator of “training_file.csv” must be “,”.

  3. The “word_dict.wd” might match to firmware of FPGA.

  4. You can check available training algorithms and USB serial ports

    with option “–info”.

“-s” (split) flag:
In case the “-t” parameter is passed, it breaks the file into a training

and test sample in the ratio of 70/30.

“-v” (verbose) flag:

Enables verbose output of all errors.

All additional notifications are highlighted in yellow.

“-i” (information) flag:

Displays a message about the available algorithms and serial ports.

“-a” (accuracy) flag:

Calculates classification accuracy.

The sample passed for classification must contain the classes

in the first column.

Examples:

  1. This example starts the training task:

    $ fpga4p -t “training.csv,nbc_t”

  1. This example starts the classification task:

    $ fpga4p -c “class.csv,nbc_c,training.wd,/dev/ttyUSB0”

  2. This example prints available modules for training and

    classification, as well as available serial USB ports:

    $ fpga4p -i

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

fpga4p-2.1.tar.gz (18.5 kB view hashes)

Uploaded Source

Built Distribution

fpga4p-2.1-py3-none-any.whl (25.5 kB view hashes)

Uploaded Python 3

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