Skip to main content

TinyMS is an Easy-to-Use deep learning development toolkit.

Project description

TinyMS logo

TinyMS

PyPI - Python Version PyPI Downloads DockerHub Build Status Documentation Status Releases LICENSE Slack PRs Welcome

English | 查看中文

TinyMS is an Easy-to-Use deep learning framework development toolkit based on MindSpore, designed to provide quick-start guidelines for machine learning beginners.

TinyMS Architecture

Installation

Distribution Version Command
PyPI x.y.z pip install tinyms==x.y.z
latest pip install git+https://github.com/tinyms-ai/tinyms.git
Docker x.y.z docker pull tinyms==x.y.z
latest -

NOTICE: The x.y.z version shown above should be replaced with the real version number.

Please checkout the install document to quickly install or upgrade TinyMS project.

Quick start

Have no idea what to do with TinyMS❓ See the Quick Start to implement the image classification application in one minutes❗

Besides, here are some use cases listed to demonstrate how TinyMS simplifies the code flow for users.

Data loading and preprocess

from tinyms.data import MnistDataset, download_dataset
from tinyms.vision import mnist_transform

data_path = download_dataset('mnist')
mnist_ds = MnistDataset(data_path, shuffle=True)
mnist_ds = mnist_transform.apply_ds(mnist_ds)

Network construction

from tinyms.model import lenet5

net = lenet5(class_num=10)

Model train/evaluation

from tinyms.model import Model

model = Model(net)
model.compile(loss_fn=net_loss, optimizer=net_opt, metrics=net_metrics)
model.train(epoch_size, train_dataset)
model.save_checkpoint('./checkpoint_lenet.ckpt')
···
model.load_checkpoint('./checkpoint_lenet.ckpt')
model.eval(eval_dataset)

Model prediction

from PIL import Image
import tinyms as ts
from tinyms.model import Model, lenet5
from tinyms.vision import mnist_transform

img = Image.open(img_path)
img = mnist_transform(img)

net = lenet5(class_num=10)
model = Model(net)
model.load_checkpoint('./checkpoint_lenet.ckpt')

input = ts.expand_dims(ts.array(img), 0)
res = model.predict(input).asnumpy()
print("The label is:", mnist_transform.postprocess(res))

API documentation

If you are interested in learning TinyMS API, please find TinyMS Python API in API Documentation.

Tutorial

For a more detailed step-by-step video tutorial, please refer to the following website.

Episode Title Content Docs Status Update Time
EP01 How to learn Deep Learning? The Most Efficient Way For Beginners! Teacher's profile+DeepLearning Course Introduction - Published 2021.3.30
EP02 How we teach computers to understand pictures? Three Ways to Install TinyMS It uncovers the magic of computer vision + three ways to install TinyMS (Ubuntu, Win10, Docker) TinyMS Installation For Beginners Published 2020.3.31
EP03 Learn Shell Script in 30 Minutes It covers the essential concepts such as using variables, basic operators, loops & functions and so on. It also gives you an insight by scaling down some real-time scenarios and demonstrating them using the docker container. Learn Shell Script in 30 Minutes (doc) Published 2020.4.1
EP04 Learn Python in 30 Minutes(Part I.) Python installation, basic syntax, primitive data types and operators Learn Python in 30 Minutes Published 2021.4.23
EP05 Learn Python in 30 Minutes(Part II.) Python conditional statements, loop statements, iterators, generators, functions, class, module, advanced usages, and several most commonly used Python libraries in deep learning Learn Python in 30 Minutes Published 2022.1.10

Community

For any developers who are not familiar with how TinyMS community works, please find the Contributing Guidelines to get started.

Release Notes

The release notes, see our RELEASE.

License

Apache License 2.0

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

tinyms-0.3.2.tar.gz (90.2 kB view details)

Uploaded Source

Built Distribution

tinyms-0.3.2-py3-none-any.whl (150.4 kB view details)

Uploaded Python 3

File details

Details for the file tinyms-0.3.2.tar.gz.

File metadata

  • Download URL: tinyms-0.3.2.tar.gz
  • Upload date:
  • Size: 90.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6

File hashes

Hashes for tinyms-0.3.2.tar.gz
Algorithm Hash digest
SHA256 22ea61f8e21f8ef79acad5630e2081d36bf77271d1aa56918b420748b7921553
MD5 1d4f4e0c1647a9a12340c04060904aaf
BLAKE2b-256 fe4a2127a2c064ca36ed5b8bd46d456c1f69cb9186d555ee4f47b351225ce791

See more details on using hashes here.

File details

Details for the file tinyms-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: tinyms-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 150.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6

File hashes

Hashes for tinyms-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 981e2a591fa4f10a8effe2763867bccc4ecd6848e46ece3f5ac532e1c307a6c2
MD5 b3375d09b689efbe283e666fe16ae953
BLAKE2b-256 c80cc2fcdaffadaa2e94f60473401b6a4f43ced24885f5e799bc79832e126bc6

See more details on using hashes here.

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