- these are codes i wrote as i was learning pytorch
- i followed this tutorial: https://machinelearningmastery.com/pytorch-tutorial-develop-deep-learning-models/
- since i didn't have a lot of experience with OOP, some of the code blocks required more time and effort to follow
- this code describes how to create a custom dataset in pytorch
- the code was influenced by this tutorial: https://www.journaldev.com/36576/pytorch-dataloader
- defining a custom dataset requires overwriting __len__ and __getitem__ methods
- this is to learn how to split the data into training and dev set using random_split
- code to do binary classification with a multi layer perceptron (mlp)
- code to do mutli-class classification with a multi layer perceptron (mlp)
- the dataset has 4 inputs and 1 output
- the inputs are:
- sepal length (cm)
- sepal width (cm)
- petal length (cm)
- petal width (cm)
- the outputs could be either Iris setosa, Iris versicolour, Iris virginica
(image from https://medium.com/@jebaseelanravi96/machine-learning-iris-classification-33aa18a4a983)
- code to do regression with a multi layer percept
- the dataset has 13 inputs and 1 output
- one of the input is a binary class
- the rest of the inputs are continuous
- code to do handwritten digit recognition (MNIST) with a convolutional neural network (CNN)
- has 2 conv layers and 2 fully connected layers