within this repository, you'll find a diverse array of datasets, all harnessed to refine and train our models.
During I learn deep learning, I am about to record the datasets which I will have encountered.
Simultaneously, I will train and test the datasets by various suitable models as much as possible. I will have learned and add some comments in some crucial places.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You must install the relevant dependency packages.
- Python - programming language
- PyTorch - deep learning framework
pip3 install torch torchvision torchaudio
- NumPy - numerical calculation tools
pip install numpy
- Matplotlib - python drawing library
pip install matplotlib
- rich - a Python library for rich text and beautiful formatting in the terminal
pip install rich
Simultaneously, every dataset needs to be downloaded Automatically after the code is run. Please ensure you can get online.
After installing related dependencies, you simply have to clone this repository locally.
use ssh
git clone [email protected]:sonrisa07/train-with-datasets.git
use https
git clone https://github.com/sonrisa07/train-with-datasets.git
Please ensure that you are currently in the repository directory.
There are numerous models, each containing many executable python files using different datasets. Then, pick one of them and begin executing it.
Next, we use the vgg model and CIFAR-10 dataset as an example. The python file is ./models/vgg/cifar10.py
.
Firstly, you can check the optional command parameters.
python /models/vgg/cifar10.py --help
For instance, you can customize parameters such as epochs and learning rate.
python /models/vgg/cifar10.py -e 20 --lr 1e-3
You can also opt for various models to apply to this dataset.
python /models/vgg/cifar10.py -m VGG16
⚠️ The models folders include various models, but it's important to note that not all models are suitable for every dataset.
Hence, you should select a fitting model for the dataset. At the outset of each Python file for the dataset, optional model parameters are provided for your use. Models outside the designated range are not compatible.
Certainly, you can directly adjust the parameters in the dataset python file.
The program will save the model's parameter file from the best performance on the validation set to the local storage, and you can also modify the path.
During development, I've worked to minimize the coupling between models and datasets.
This allows you to seamlessly integrate models into your project, and you can also fine-tune parameters in the code to meet your objectives.
I trust in your capability.