본문 바로가기

728x90

ComputerScience/Machine Learning

(48)
Deep Learning - 3.5 Weight Decay Weight decay (commonly called L2 regularization), might be the most widely-used technique for regularizing parametric machine learning models. how should the model trade off the standard loss for this new additive penalty? In practice, we characterize this tradeoff via the regularization constant λ, a non- negative hyperparameter that we fit using validation data given the penalty term alone, ou..
Deep Learning - 3.4 Model Selection, Underfitting, Overfitting How to discover patterns that generalize is the fundamental problem of machine learning. Our predictions will only be useful if our model has truly discovered a general pattern. When working with finite samples, we run the risk that we might discover apparent associations that turn out not to hold up when we collect more data. The phenomenon of fitting our training data more closely than we fit ..
Deep Learning - 3.2~3.3 Implementation of Multilayer Perceptrons This time we'll make deeper neural network which classify MNIST fashion dataset. For the same classification problem, the implementation of an MLP is the same as that of softmax regression except for additional hidden layers with activation functions. 1. Model Typically, we choose layer widths in powers of 2, which tend to be computationally efficient because of how memory is allocated and addre..
Deep Learning - 3.1 Multilayer perceptrons we will learn how to incorporate nonlinearities to build expressive multilayer neural network architectures. MLP adds one or multiple fully-connected hidden layers between the output and input layers and transforms the output of the hidden layer via an activation function. Hidden Layers Activation Functions 1 Hidden Layers MLPs can capture complex interactions among our inputs via their hidden n..
Deep Learning - 2.7 Concise Implementation of Softmax Regression This time we will use high-level-apis of deep learning framework to implement softmax regression. first load mnist-fashion data import torch from torch import nn import torchvision from torchvision import transforms from torch.utils import data import matplotlib.pyplot as plt import numpy # `ToTensor` converts the image data from PIL type to 32-bit floating point # tensors. It divides all number..
Deep Learning - 2.6 Implementation of Softmax Regression from Scratch Now we will implement softmax regression from scratch Initialize Model parameters Defining the softmax operation Defining the Model Defining the loss funciton 1. Initialize Model Parameters Each example in the raw dataset is a 28 × 28 image. We will flaten them into a vector of length 784 and treat each pixel location as just another feature. Because our dataset has 10 classes, our network will ..
Deep Learning - 2.5 The Image Classification Dataset One of the widely used dataset for image classification is the MNIST dataset. Reading the Dataset Reading Minibatch 1. Reading the Dataset download and read the Fashion-MNIST dataset into memeory. Fashion-MNIST consists of images from 10 categories, each represented by 6000 images in the training dataset and by 1000 in the test dataset. The height and width of each input image are both 28 pixels..
Deep Learning - 2.4 Softmax Regression Regression is the hammer we reach for when we want to answer how much? or how many? questions. In practice, we are more often interested in classification: asking not “how much” but “which one”: Classification Network Architecture Initializing Model Parameters ParameterizationCostofFully-ConnectedLayers Softmax Operation Vectorization for Minibatches Loss Function Softmax and Derivatives Cross-..

728x90