Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Transformers | 112,535 | 64 | 1,869 | 20 hours ago | 114 | July 18, 2023 | 844 | apache-2.0 | Python | |
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX. | ||||||||||
Pytorch | 71,175 | 3,341 | 6,728 | 20 hours ago | 37 | May 08, 2023 | 12,795 | other | Python | |
Tensors and Dynamic neural networks in Python with strong GPU acceleration | ||||||||||
Keras | 59,445 | 578 | a day ago | 80 | June 27, 2023 | 98 | apache-2.0 | Python | ||
Deep Learning for humans | ||||||||||
Yolov5 | 41,907 | 2 days ago | 8 | September 21, 2021 | 222 | agpl-3.0 | Python | |||
YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite | ||||||||||
Annotated_deep_learning_paper_implementations | 36,223 | 1 | 9 days ago | 78 | September 24, 2022 | 27 | mit | Jupyter Notebook | ||
🧑🏫 60 Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠 | ||||||||||
Made With Ml | 34,217 | 2 days ago | 5 | May 15, 2019 | 4 | mit | Jupyter Notebook | |||
Learn how to design, develop, deploy and iterate on production-grade ML applications. | ||||||||||
Deepspeed | 28,611 | 53 | a day ago | 68 | July 17, 2023 | 799 | apache-2.0 | Python | ||
DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective. | ||||||||||
Ray | 27,922 | 80 | 298 | 20 hours ago | 87 | July 24, 2023 | 3,428 | apache-2.0 | Python | |
Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads. | ||||||||||
Lightning | 24,728 | 7 | 620 | 20 hours ago | 253 | July 25, 2023 | 686 | apache-2.0 | Python | |
Deep learning framework to train, deploy, and ship AI products Lightning fast. | ||||||||||
Fastai | 24,552 | 184 | 145 | 2 days ago | 146 | March 28, 2023 | 186 | apache-2.0 | Jupyter Notebook | |
The fastai deep learning library |
A scikit-learn compatible neural network library that wraps PyTorch.
To see more elaborate examples, look here.
import numpy as np
from sklearn.datasets import make_classification
from torch import nn
from skorch import NeuralNetClassifier
X, y = make_classification(1000, 20, n_informative=10, random_state=0)
X = X.astype(np.float32)
y = y.astype(np.int64)
class MyModule(nn.Module):
def __init__(self, num_units=10, nonlin=nn.ReLU()):
super().__init__()
self.dense0 = nn.Linear(20, num_units)
self.nonlin = nonlin
self.dropout = nn.Dropout(0.5)
self.dense1 = nn.Linear(num_units, num_units)
self.output = nn.Linear(num_units, 2)
self.softmax = nn.Softmax(dim=-1)
def forward(self, X, **kwargs):
X = self.nonlin(self.dense0(X))
X = self.dropout(X)
X = self.nonlin(self.dense1(X))
X = self.softmax(self.output(X))
return X
net = NeuralNetClassifier(
MyModule,
max_epochs=10,
lr=0.1,
# Shuffle training data on each epoch
iterator_train__shuffle=True,
)
net.fit(X, y)
y_proba = net.predict_proba(X)
In an sklearn Pipeline:
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
pipe = Pipeline([
('scale', StandardScaler()),
('net', net),
])
pipe.fit(X, y)
y_proba = pipe.predict_proba(X)
With grid search:
from sklearn.model_selection import GridSearchCV
# deactivate skorch-internal train-valid split and verbose logging
net.set_params(train_split=False, verbose=0)
params = {
'lr': [0.01, 0.02],
'max_epochs': [10, 20],
'module__num_units': [10, 20],
}
gs = GridSearchCV(net, params, refit=False, cv=3, scoring='accuracy', verbose=2)
gs.fit(X, y)
print("best score: {:.3f}, best params: {}".format(gs.best_score_, gs.best_params_))
skorch also provides many convenient features, among others:
skorch requires Python 3.8 or higher.
You need a working conda installation. Get the correct miniconda for your system from here.
To install skorch, you need to use the conda-forge channel:
conda install -c conda-forge skorch
We recommend to use a conda virtual environment.
Note: The conda channel is not managed by the skorch maintainers. More information is available here.
To install with pip, run:
python -m pip install -U skorch
Again, we recommend to use a virtual environment for this.
If you would like to use the most recent additions to skorch or help development, you should install skorch from source.
To install skorch from source using conda, proceed as follows:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
conda create -n skorch-env python=3.10
conda activate skorch-env
conda install -c pytorch pytorch
python -m pip install -r requirements.txt
python -m pip install .
If you want to help developing, run:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
conda create -n skorch-env python=3.10
conda activate skorch-env
conda install -c pytorch pytorch
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -e .
py.test # unit tests
pylint skorch # static code checks
You may adjust the Python version to any of the supported Python versions.
For pip, follow these instructions instead:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
# create and activate a virtual environment
python -m pip install -r requirements.txt
# install pytorch version for your system (see below)
python -m pip install .
If you want to help developing, run:
git clone https://github.com/skorch-dev/skorch.git
cd skorch
# create and activate a virtual environment
python -m pip install -r requirements.txt
# install pytorch version for your system (see below)
python -m pip install -r requirements-dev.txt
python -m pip install -e .
py.test # unit tests
pylint skorch # static code checks
PyTorch is not covered by the dependencies, since the PyTorch version you need is dependent on your OS and device. For installation instructions for PyTorch, visit the PyTorch website. skorch officially supports the last four minor PyTorch versions, which currently are:
However, that doesn't mean that older versions don't work, just that they aren't tested. Since skorch mostly relies on the stable part of the PyTorch API, older PyTorch versions should work fine.
In general, running this to install PyTorch should work:
# using conda:
conda install pytorch pytorch-cuda -c pytorch
# using pip
python -m pip install torch