Skip to content

Instantly share code, notes, and snippets.

View devil-cyber's full-sized avatar
💭
Always Learning

Manikant Kumar devil-cyber

💭
Always Learning
View GitHub Profile
@codersgyan
codersgyan / cloudSettings
Created January 10, 2022 10:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-01-10T10:45:13.272Z","extensionVersion":"v3.4.3"}
@devil-cyber
devil-cyber / _cnn.py
Created November 13, 2020 08:27
CNN classifier using CIFAR10 dataset with Pytorch
import torch
import torch.nn as nn
import torchvision
from torchvision.transforms import transforms
from torchvision import datasets
from torch.utils.data import DataLoader
import torch.nn.functional as F
# HyperParameter
device = torch.device('cuda' if torch.cuda.is_available else 'cpu')
@devil-cyber
devil-cyber / feedForward.py
Created November 13, 2020 06:19
Feed Forward Neural Net MNIST dataset classifier using Pytorch
# MNIST
# DataLoader Neural Net, activation function
# Loss and Optimizer
# Training Loop (batch training)
# Model evaluation
# GPU Support
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
@devil-cyber
devil-cyber / backpropagation.py
Created November 11, 2020 11:49
Backpropagation using Pytorch
import torch
'''
Backpropgation
eg. x = [1.,1.,1] -> "This is the fixed feature value:"
y = x + 2 -> a(x) -> "This is the respective y value:"
z = y*y*3 -> b(y) -> "This is the example for loss function"
Backpropgation x -> a(x) -> b(y) -> z
dz/dx = dz/dy * dy/dx (Chain Rule)