Skip to content

This repository shows an example of the usability of SKORCH to train a PyTorch model making use of different capabilities of the scikit-learn framework.

Notifications You must be signed in to change notification settings

FernandoLpz/SKORCH-PyTorch-Wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medium Twitter Linkedin

SKORCH: PyTorch Models Trained with a Scikit-Learn Wrapper

This repository shows an example of the usability of SKORCH to train a PyTorch model making use of different capabilities of the scikit-learn framework.

If you want to understand the details about how this model was created, take a look at this very clear and detailed explanation: SKORCH: PyTorch Models Trained with a Scikit-Learn Wrapper

Table of Contents

1. The model

The idea of this repository is to show how to use some of the SKorch functionalities to train a PyTorch model. In this case, a neural network was created to classify the wines dataset. In order to understand better what SKorch is, take a look at the following image:

2. Files

  • data: Here you will find the wines dataset
  • src: It contains two files data_loader.py and model.py. The file data_loader.pycontains the functions to load an preprocess the wines dataset. The file model.pycontains the PyTorch model.
  • main.py: This file trigger the different cases explained in the Medium article.

3. How to use

You just need to type

python main.py

however, I recommend you to work with a virtual environment, in this case I am using pipenv. So in order to install the dependencies located in the Pipfile you just need to type:

pipenv install

and then

pipenv shell

4. Contributing

Feel free to fork the model and add your own suggestiongs.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/YourGreatFeature)
  3. Commit your Changes (git commit -m 'Add some YourGreatFeature')
  4. Push to the Branch (git push origin feature/YourGreatFeature)
  5. Open a Pull Request

5. Contact

If you have any question, feel free to reach me out at:

6. License

Distributed under the MIT License. See LICENSE.md for more information.

About

This repository shows an example of the usability of SKORCH to train a PyTorch model making use of different capabilities of the scikit-learn framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages