Giter Site home page Giter Site logo

s-mostafa-a / pytorch_learning Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 56.11 MB

Trying to learn PyTorch

Home Page: https://pytorch.org

License: MIT License

Python 0.58% Jupyter Notebook 99.42%
pytorch pytorch-tutorials pytorch-implementation pytorch-cnn pytorch-gan pytorch-regression

pytorch_learning's Introduction

Playing with PyTorch

This repository is my playground for getting to know PyTorch library of python. Mainly I've gone through PyTorch's 60 minutes blitz and Aakash NS's webinar. To install all of your requirements, just run the command below in your terminal:
pip install -r requirements.txt

Code Components Description

This is a small and useful unittest for the tensors generated by models. It has two responsibilities:

  • check the shape of a tensor
  • check if two tensors are equal in values

The first one will be quite useful if you are creating a novel structure of neural networks. Shape checking for tensor will provide a pretty decent prevention to future unwanted results or bugs.

This directory has got all details I've extracted from tutorials. Especially in the notes.py file, I've written some comments which I think they can be helpful for all my future projects.

This one has got two files, which I've implemented linear regression with two approaches: with and without nn class of torch.
Both are quite simple codes, but it was necessary for me to know what is going on inside the nn.Linear class. Also, the Dataset is a random matrix in which columns are some random features.

At this directory, I've written two classifications for the MNIST dataset. They do the same thing logically, but they are different in implementation. The one with _not_best_practice ending is all written by myself, and the other one is from Aakash's webinar with some modifications.

Things implemented here are just like the above's, but instead of a linear model, I've put a DNN model with just one hidden layer, which is so simple.

Here is also something like the simple deep neural network, two ways of implementation, which are logically the same. The difference between them with simple deep neural nets are just in the models.

This one is quite different from the above models. Two main files are MNSIT_GANs and CIFAR10_GANs, which the first one is inspired by Aakash's webinar (all parameters and models are the same as the webinar's parameters). Inside the model, the generator tries to generate handwritten digits like the MNIST data set. You can see the model's progress at each epoch in the following gif:
Alt Text
But at the second one, I've tried (and am trying) to generate pictures like the cifar10 dataset. First, I converted the pictures to grayscale for convenience, then I tried some different parameters and functions, but there were not any significant results. For the future work, I will continue exploring the best architecture and parameters for the model. If you think you have got any better solutions, please make a pull request.

pytorch_learning's People

Contributors

s-mostafa-a avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

barseghyanartur

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.