This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2022-01-10T10:45:13.272Z","extensionVersion":"v3.4.3"} |