Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

The Intellino core logic wrapper for ML simulation with intellino


Table of Contents

About The Project

SoC Platform Lab in Seoultech, South Korea made SoC chip called "Intellino". Intellino designed to working AI algorithms like aa classification task.

Sometimes people feels to hard using directly board combined SoC chip. This Project for people as feels hard using board combined SoC chip support simulation built using python

Getting Started

Intellino package can install from PyPi simply

Prerequisites

  • python3.6

Installation

pip3 install Intellino

Usage

MNIST classification

MNIST contains 70,000 images of handwritten digits: 60,000 for training and 10,000 for testing. The images are grayscale, 28x28 pixels. many AI framework use MNIST classification as example code.

import matplotlib.pyplot as plt

from intellino.core.neuron_cell import NeuronCells
from intellino.utils.data.dataloader import DataLoader

from mnist_dataset import MNIST


def test(neuron_cells, is_log=False):
    test_mnist = MNIST(root="./", train=False, download=False)
    test_dataloader = DataLoader(test_mnist, shuffle=True)

    TP = 0
    for idx, (image, target) in enumerate(test_dataloader):

        prediction = neuron_cells.inference(image)

        if target == prediction:
            TP += 1

        if is_log:
            print(f"label-> {target}, prediction-> {prediction}")

    print("Accuracy : {}".format(TP / len(test_mnist)))


def train():
    train_mnist = MNIST(root="./", train=True, download=False)
    train_dataloader = DataLoader(train_mnist, shuffle=True)

    number_of_neuron_cells = 100
    length_of_input_vector = 256
    neuron_cells = NeuronCells(number_of_neuron_cells=number_of_neuron_cells,
                               length_of_input_vector=length_of_input_vector,
                               measure="manhattan")

    print(f"Number of Cells : {len(neuron_cells)}")

    each_clss_distrib = {"0": 0,
                         "1": 0,
                         "2": 0,
                         "3": 0,
                         "4": 0,
                         "5": 0,
                         "6": 0,
                         "7": 0,
                         "8": 0,
                         "9": 0,}

    finish_train = False

    print("Start Training!")
    for idx, (image, target) in enumerate(train_dataloader):
        if finish_train:
            break

        each_clss_distrib[str(target)] += 1
        finish_train = neuron_cells.train(vector=image, target=target)

    print("Done!")
    return neuron_cells


if __name__ == "__main__":
    # Dataset Visualization
    mnist_tets = MNIST(root="./", train=True, download=False)
    image, target = mnist_tets.__getitem__(0)
    image = image.reshape(16, 16)
    plt.figure()
    plt.imshow(image)
    plt.title(str(target))
    plt.show()

    # Train NeuronCells
    neuron_cells = train()
    test(neuron_cells, is_log=False)

NeuronCells

NeuronCells class is core in Intellino. we just focus on here:

  • number_of_neuron_cells: Intellino has cells. concept is similar with model in other AI framework like PyTorch, TensorFlow
  • length_of_input_vector: cells can split each cell and each cell have data container and data container has limit legnth

For more examples, please refer to the Documentation

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

Martin Hwang - hwangdonghyun@seoultech.ac.kr

 

Release files for intellino 0.0.1.dev37

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for intellino 0.0.1.dev37
File Size Uploaded
intellino-0.0.1.dev37.tar.gz 20.9 kB Details

Release files / intellino-0.0.1.dev37.tar.gz

Download URL intellino-0.0.1.dev37.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2f30de094829fad765958c1c425de6c6aa27429207cb8b8f84f6fbda43d014c9
BLAKE2b-256 checksum
How to use checksums
dbb65fa9eb5a268acd1e9afad3ed88b2d291039989b4d7eb89d1cfb727fbecde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page