A wrapper for ONNX models that adheres to the instancelib specification
Project description
instancelib-onnx
ONNX extension for instancelib.
Installation
You can install this package as follows:
pip install instancelib-onnx
Or by cloning this repo and issuing:
python setup.py
You will need at least Python 3.8 to use this library.
Usage
import instancelib as il
import ilonnx
# Specify the model location and the label translation
model = ilonnx.build_data_model("example_models/data-model.onnx",
{0: "Bedrijfsnieuws", 1: "Games", 2: "Smartphones"})
Then you can use the normal instancelib functionality to interact with the model.
# Load a dataset with instancelib
env = il.read_excel_dataset("datasets/testdataset.xlsx", ["fulltext"], ["label"])
# Assess the performance like any other instancelib model
performance = il.classifier_performance(model, env.dataset, env.labels)
performance.confusion_matrix
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
instancelib-onnx-0.1.2.tar.gz
(19.1 kB
view hashes)
Built Distribution
Close
Hashes for instancelib_onnx-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9528e7c388c04c0353c911a2a30c6ff8dc5a9c4efa45f554b0f1420d7480d8f |
|
MD5 | bcda4acb4577fb0b75518e4f8151f1ed |
|
BLAKE2b-256 | f92ebacfa96a95b612fa4500ec9f19bfb67f08d7f60be2eb30d807377a2e7261 |