Skip to content

fac25/mind

This branch is 4 commits behind besarthoxhaj/mind:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

da6a242 · Mar 17, 2023

History

29 Commits
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Feb 24, 2023
Mar 17, 2023
Feb 24, 2023
Dec 22, 2022
Nov 19, 2022
Feb 10, 2023
Dec 22, 2022
Dec 22, 2022

Repository files navigation

Machine Mind

Repository about Machine Learning and Deep Learning.

$ git clone https://github.com/besarthoxhaj/mind.git
$ cd mind/
$ mkdir work
$ docker builder prune
$ docker build . -t mind
$ docker run --rm -p 8888:8888 -v "$PWD"/work:/home/jovyan/work mind
# Entered start.sh with args: jupyter la
# ...
# http://127.0.0.1:8888/lab

000

Jupyter Notebook

Once inside the Jupyter Notebook select "Python 3" as notebook. Then write and execute a simple command to check everything is ok.

001

import torch
x = torch.rand(5, 3)
print(x)

002

Great! Seem everything is working as expected. Let's try now to download the MNIST dataset and run a CNN (Convolutional Neural Network).

from torchvision import datasets
from torchvision.transforms import ToTensor

train_data = datasets.MNIST(
    root = 'data',
    train = True,
    transform = ToTensor(),
    download = True,
)

test_data = datasets.MNIST(
    root = 'data',
    train = False,
    transform = ToTensor()
)

003

Check if the images are there with matplot library.

import matplotlib.pyplot as plt
plt.imshow(train_data.data[0], cmap='gray')
plt.title('%i' % train_data.targets[0])
plt.show()

004

If also the last step worked you are all set. Just follow the resources. Or simply search for simple neural networks to do anything, the internet it's full of them.

Resources

  1. 3Blue1Brown: https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi
  2. PyTorch get started: https://pytorch.org/get-started/locally
  3. Google Colab: https://colab.research.google.com
  4. PyTorch tutorial: https://pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.7%
  • Python 1.7%
  • HTML 1.5%
  • Dockerfile 0.1%