• Stars
    star
    276
  • Rank 149,319 (Top 3 %)
  • Language
    Python
  • Created about 7 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A short tutorial on performing fine tuning or transfer learning in PyTorch.

mit-logo

alt_tag

Pytorch Tutorial for Fine Tuning/Transfer Learning a Resnet for Image Classification

If you want to do image classification by fine tuning a pretrained mdoel, this is a tutorial will help you out. It shows how to perform fine tuning or transfer learning in PyTorch with your own data. It is based on a bunch of of official pytorch tutorials/examples. I felt that it was not exactly super trivial to perform in PyTorch, and so I thought I'd release my code as a tutorial which I wrote originally for my research.

Highly encourage you to run this on a new data set (read main_fine_tuning.py to know which format to store your data in), but for a sample dataset to start with, you can download a simple 2 class dataset from here - https://download.pytorch.org/tutorial/hymenoptera_data.zip

All Torch and PyTorch specific details have been explained in detail in the file main_fine_tuning.py

Hope this tutorial helps you out! :)

Credits - This tutorial is built on top of mainly on 2 Pytorch tutorials - http://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html and https://github.com/pytorch/examples/tree/master/imagenet.

More Repositories

1

DeepLearningProject

An in-depth machine learning tutorial introducing readers to a whole machine learning pipeline from scratch.
HTML
4,756
star
2

Me_Bot

Build a bot that speaks like you!
Jupyter Notebook
682
star
3

A-Collection-of-important-tasks-in-pytorch

Everyday things people use in Pytorch. No need to spend hours reading Pytorch forums trying to find them!
HTML
279
star
4

NLP-Intuition-and-Applications-of-word-embeddings

UPCOMING TUTORIAL on Word Representations and how they are important for NLP applications.
32
star
5

lectures_and_talks

Collection of lectures and talks I've given on Computer Vision and Deep Learning
28
star
6

generalization_to_OOD_category_viewpoint_combinations

Source code for the Nature Machine Intelligence paper: When and how convolutional neural networks generalize to out-of-distribution category-viewpoint combinations.
Python
21
star
7

Spotify

Repo for spotify project for capstone
Jupyter Notebook
8
star
8

End_to_end_image_classification_pipeline

In-depth look at an image classification pipeline for your own dataset. https://goo.gl/BuL267
HTML
7
star
9

in_distribution_adversarial_examples

Source code for the paper: "Adversarial examples within the training distribution: A widespread challenge"
Jupyter Notebook
6
star
10

flask_example

Simple example for passing information around using flask. Shows how to accept input from user and use the input for something else.
HTML
4
star
11

pytorch_data_loader_tutorial

Python
4
star
12

online_tutorials

Collection of good online tutorials I keep running into while learning new things.
4
star
13

python_for_people_with_no_background

Basic Python
3
star
14

Statistical_Intuitions

A blog introducing some basics, and some less talked about ideas in statistics. To request an article on a topic, create an issue on this repo!
HTML
3
star
15

deep_learning_normalization

A personal pet project to explore different kinds of normalizations in Deep Learning research
3
star
16

Harvard_BAI

Repo for Harvard's Biological and Artificial Intelligence course (Neuro 140/240).
Jupyter Notebook
3
star
17

learning_to_speak_python

A course I am putting together to make the quarantine more productive for people from diverse backgrounds. The goal is to teach everyone to communicate with computers using python.
Jupyter Notebook
3
star
18

interpretability_reading_group

Storing meeting papers + notes + discussions
2
star
19

Probability_ML_Proofs

Collection of important proofs in basic probability and machine learning.
2
star
20

human_visual_diet

Jupyter Notebook
2
star
21

lit_review

Cross Referencing on steroids: Scripts to extract papers that you should read if you like a paper.
Python
1
star
22

pirate_bot

Pirate bot
Jupyter Notebook
1
star
23

GANs_vs_Humans

Jupyter Notebook
1
star