This repository is an implementation of a deep learning library written in Python. Inspired by PyTorch, this library, MyTorch®
is used to create everything from multilayer perceptrons (MLP), convolutional neural networks (CNN), to recurrent neural networks with gated recurrent units (GRU) and long-short term memory (LSTM) structures.
MyTorch®
is structurally similar to to PyTorch and TensorFlow and its modules can be reused in other applications.
- Clone the repository and run
poetry install
. - Run
make help
for further instructions.
- MLP:
- Linear Layer
[mytorch.nn.Linear]
- Activation Functions:
- Sigmoid
[mytorch.nn.Sigmoid]
- ReLU
[mytorch.nn.ReLU]
- Tanh
[mytorch.nn.Tanh]
- Sigmoid
- Neural Network Models:
- MLP0 (Hidden Layers = 0)
[mytorch.models.MLP0]
- MLP1 (Hidden Layers = 1)
[mytorch.models.MLP1]
- MLP4 (Hidden Layers = 4)
[mytorch.models.MLP4]
- MLP0 (Hidden Layers = 0)
- Criterion: Loss Functions
- MSE Loss
[mytorch.nn.MSELoss]
- Cross-Entropy Loss
[mytorch.nn.CrossEntropyLoss]
- MSE Loss
- Optimizers:
- Stochastic Gradient Descent (SGD)
[mytorch.optim.SGD]
- Stochastic Gradient Descent (SGD)
- Regularization:
- Batch Normalization
[mytorch.nn.BatchNorm1d]
- Batch Normalization
- Linear Layer
- CNN:
- Resampling:
- Upsample1d
[mytorch.nn.Upsample1d]
- Downsampling1d
[mytorch.nn.Downsampling1d]
- Upsampling2d
[mytorch.nn.Upsampling2d]
- Downsampling2d
[mytorch.nn.Downsampling2d]
- Upsample1d
- Convolutional Layer:
- Conv1d_stride1
[mytorch.nn.Conv1d_stride1]
- Conv1d
[mytorch.nn.Conv1d]
- Conv2d_stride1
[mytorch.nn.Conv2d_stride1]
- Conv2d
[mytorch.nn.Conv2d]
- Conv1d_stride1
- Transposed Convolution:
- ConvTranspose1d
[mytorch.nn.ConvTranspose1d]
- ConvTranspose2d
[mytorch.nn.ConvTranspose2d]
- ConvTranspose1d
- Pooling:
- MaxPool2d_stride1 or MeanPool2d_stride1
[mytorch.nn.MaxPool2d_stride1]
or[mytorch.nn.MeanPool2d_stride1]
- MaxPool2d or MeanPool2d
[mytorch.nn.MaxPool2d]
or[mytorch.nn.MeanPool2d]
- MaxPool2d_stride1 or MeanPool2d_stride1
- Resampling:
- RNN:
- RNN Cell
[mytorch.nn.rnn_cell]
- RNN Phoneme Classifier
[models.rnn_classifier]
- GRU Cell
[mytorch.nn.gru_cell]
- CTC
[mytorch.nn.ctc]
- CTC Loss
- CTC Decoding: Greedy Search and Beam Search
[mytorch.nn.CTCDecoding]
- RNN Cell
Made with ☕ as part of Carnegie Mellon University's 11-785 Introduction to Deep Learning.