Deeptech
A library that helps with writing ai functions fast.
It ships with a full Documentation of its API and Examples.
Getting Started
Please make sure you have pytorch installed properly as a first step.
pip install deeptech
Then follow one of the examples or check out the api documentation.
Design Principles
The api builds on three core parts: Data, Model or Training. Some parts which are considered core functionality that is shared among them is in the core package.
- Data is concerned about loading and preprocessing the data for training, evaluation and deployment.
- Model is concerned with implementing the model. Everything required for the forward pass of the model is here.
- Training contains all required for training a model on data. This includes loss, metrics, optimizers and trainers.
- Core contains functionality that is shared across model, data and training.
Tutorials & Examples
Starting with tutorials and examples is usually easiest.
Simple Fashion MNIST Examples:
- Fasion MNIST: Simple
- Fasion MNIST: Custom Model
- Fasion MNIST: Custom Loss
- TODO Fasion MNIST: Custom Optimizer
- Fasion MNIST: Custom Dataset
Fashion MNIST
Here is the simplest mnist example, it is so short it can be part of the main readme.
from deeptech.data.datasets import FashionMNISTDataset
from deeptech.model.models import ImageClassifierSimple
from deeptech.training.trainers import SupervisedTrainer
from deeptech.training.losses import SparseCrossEntropyFromLogits
from deeptech.training.optimizers import smart_optimizer
from deeptech.core import Config, cli
from torch.optim import SGD
class FashionMNISTConfig(Config):
def __init__(self, training_name, data_path, training_results_path):
super().__init__(training_name, data_path, training_results_path)
# Config of the data
self.data_dataset = FashionMNISTDataset
# Config of the model
self.model_model = ImageClassifierSimple
self.model_conv_layers = [32, 32, 32]
self.model_dense_layers = [100]
self.model_classes = 10
# Config for training
self.training_loss = SparseCrossEntropyLossFromLogits
self.training_optimizer = smart_optimizer(SGD)
self.training_trainer = SupervisedTrainer
self.training_epochs = 10
self.training_batch_size = 32
# Run with parameters parsed from commandline.
# python -m deeptech.examples.mnist_simple --mode=train --input=Datasets --output=Results
if __name__ == "__main__":
cli.run(FashionMNISTConfig)
Contributing
Currently there are no guidelines on how to contribute, so the best thing you can do is open up an issue and get in contact that way. In the issue we can discuss how you can implement your new feature or how to fix that nasty bug.
To contribute, please fork the repositroy on github, then clone your fork. Make your changes and submit a merge request.
Origin of the Name
The name is a tribute to the deeptech:ai hackathon. When writing the library for fast, accessible ai development, I remembered how helpfull such a library could have been for a hackathon. Thus, I decided to name it as a tribute to that hackathon.
And besides, the name does not seem to be used for any company or library and sounds cool, at least to me. ;)
License
This repository is under MIT License. Please see the full license here.
Metadata
Release files for deeptech 20201010
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deeptech-20201010.tar.gz | 34.1 kB | Without provenance | Details for deeptech-20201010.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deeptech-20201010-py3-none-any.whl | Python 3 | none | any | Details for deeptech-20201010-py3-none-any.whl |
Total release size: 84.6 kB
Release files / deeptech-20201010.tar.gz
| Download URL | deeptech-20201010.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d62c450a67b9635b0664a2131ba5f133b3ee2a2afaa9961089a5559f3ec7f57b
|
|
BLAKE2b-256 checksum How to use checksums |
b11f8ea496fd81f02906966bb244421546be3cbcfede1707a7b923ebff49580b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / deeptech-20201010-py3-none-any.whl
| Download URL | deeptech-20201010-py3-none-any.whl |
|---|---|
| Size | 50.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9709444e4f6ec1d797a9610ea08234f02eeb0df6dea5d4cbdd57cc987b9ee2d7
|
|
BLAKE2b-256 checksum How to use checksums |
c8529051491b959e5e482f7d6b70f6186a3e0de20ab81994df2ccc81b7fe0702
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Security for deeptech 20201010
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.