Provide wrappers for popular ML libraries
See original GitHub issueIt’d be convenient to provide support for use of Keras or PyTorch models in model selection. There are two issues:
- Keras/PyTorch models don’t conform to the Scikit-learn API.
- Keras models are not pickle-able.
I’m imaging this interface:
from torchvision.models import resnet18
import torch.optim as optim
from dask_ml.wrappers import PyTorchClassifier
pytorch_model = resnet18()
sklearn_model = SkorchClassifier(
model=pytorch_model,
model__alpha=1e-2, # if resnet18 had a kwarg `alpha`
optimizer=optim.SGD,
optimizer__lr=0.1,
)
Related issues/PRs Same complaint in dask/distributed: https://github.com/dask/distributed/issues/3873
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
Best Python libraries for Machine Learning - GeeksforGeeks
Numpy; Scipy; Scikit-learn; Theano; TensorFlow; Keras; PyTorch; Pandas; Matplotlib. Numpy. NumPy is a very popular python library for ...
Read more >Top 10 Python Packages for Machine Learning - ActiveState
#2 Pytorch PyTorch is a popular ML library for Python based on Torch, which is an ML library implemented in C and wrapped...
Read more >Top Python Libraries For Data Science And Machine Learning
Here's a list of the top Python libraries for Machine Learning: ... Provides I/O wrappers and readers that can import and support a...
Read more >Top Python Machine Learning Libraries for 2022 - Simplilearn
Nolearn features a collection of abstractions and wrappers around existing neural network libraries, such as Lasagne (a lightweight library ...
Read more >25 Most Popular Python Libraries for Machine Learning in 2019
Explore the top 25 python libraries for machine learning. ... It provides wrappers around different libraries like scikit-learn, xgboost, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
SciKeras has an implementation at scikeras/wrappers.py#L87. There’s currently an open PR to merge this into Tensorflow/Keras master: https://github.com/tensorflow/tensorflow/pull/39609
Does that answer your question?
If you’re looking for a way to make Keras models conform to the scikit-learn API, check out SciKeras (full disclosure: I’m the author)