This repository contains jupyter notebooks that demonstrate how to use PyTorch for various deep learning tasks, such as image classification, object detection, natural language processing, and more. The notebooks cover the following topics:
- How to load, analyze, visualize, and preprocess different types of datasets (grayscale and RGB), such as MNIST and CIFAR10
- How to write and train deep neural network models using PyTorch, and how to use GPU for faster computation
- How to evaluate the performance of the models on test data, and how to generate metrics such as accuracy, classification report, and confusion matrix
- How to save and load the best models, and how to use them for inference on new data
The notebooks are designed to be easy to follow and understand, and they include detailed explanations and comments. They are also suitable for beginners and intermediate learners who want to learn more about deep learning and PyTorch.
This project requires Python 3.6+ and the following Python libraries installed:
- PyTorch
- Matplotlib
- NumPy
- Pandas
- Scikit-learn
- SciPy
- Jupyter
Install PyTorch using the following command:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Install the libraries using the following command:
pip install matplotlib==3.4.3 numpy==1.21.2 pandas==1.3.3 scikit-learn==0.24.2 scipy==1.7.1 jupyter==1.0.0
** Alternatively, you can use Google Colab, which already has most of the libraries pre-installed. You just need to upload the notebooks to your Google Drive and open them with Colab. **
To use the notebooks, you can either clone this repo or download the zip file. Then, you can open the notebooks with your preferred IDE (such as Jupyter Lab, VS Code, or PyCharm) or with Colab. You can run the cells in the notebooks sequentially or selectively, depending on your needs. You can also modify the code or add your own cells to experiment with different settings or models.
For more information about PyTorch and its features, you can refer to the official documentation here. You can also find useful tutorials and examples here.
If you want to contribute to this repo, you are welcome to do so. You can either submit an issue or a pull request with your suggestions or improvements. Please follow the code style and format of the existing notebooks, and add comments to explain your changes. Also, make sure to test your code before submitting it.
Copyright (c) 2024, Mohammad Junayed Hasan
This project is licensed under the MIT License - see the LICENSE file for details.