[ML] 2. Introduction to neural networks

Training an algorithm involes four ingredients:

  • Data
  • Model
  • Objective function: We put data input a Model and get output out of it. The value we call it as ‘lost‘. We want to minimize the ‘lost‘ value.
  • Optimization algorithm: For example the linear model, we will try to optimize y = wx + b, ‘w‘ & ‘b‘ so that it will minimize the ‘lost‘ value.

Repeat the process...

Three types of machine learning:

Supervised: Give feedback

  • Classification: outputs are categories: cats or dogs
  • Regression: output would be numbers.

Unsupervised: No feedback, find parttens

Reinforcement: Train the algorithm to works in a enviorment based on the rewords it receives. (Just like training your dog)

Linear Model:

f(x) = x * w + b

x: input

w: coefficient / weight

b: intercept / bias

Linear Model: Multi inputs:

x, w are both vectors:

x: 1 * 2

w: 2 * 1

f(x): 1 * 1

Notice that the lienar model doesn‘t chage, it is still:

f(x) = x * w + b

Lienar Model: multi inputs and multi outputs:

For ‘W‘, the first index is always the same as X; the second index is always the same as ouput Y.

If there is K inputs and M outputs, the number of Weigths would be K * M

The number of bias is equal to the number of ouputs: M.

N * M = (N * K) * (K * M) + 1 * M

Each model is determined by its weights and biases.

Objection function:

Is the measure used to evaluate how well the model‘s output match the desired correct values.

  • Loss function: the lower the loss function, the higher the level of accuracy (Supervized learning)
  • Reward function: the hight of the reward function, the higher the level of accuracy (Reubfircement learning)

Loss functions for Supervised learning:

  • Regression: L2-NORM

  • Classification: CROSS-ENTROPY

Expect cross-entropy should be lower.

Optimization algorithm: Dradient descent

Until one point, the following value never update anymore.

The picture looks like this:

Generally, we want the learning rate to be:

  High enough, so we can reach the closest minimum in a rational amount of time

  Low enough, so we don‘t oscillate around the minimum

N-parameter gradient descent

原文地址:https://www.cnblogs.com/Answer1215/p/12324642.html

时间: 2024-08-30 03:09:42

[ML] 2. Introduction to neural networks的相关文章

[CS231n-CNN] Training Neural Networks Part 1 : activation functions, weight initialization, gradient flow, batch normalization | babysitting the learning process, hyperparameter optimization

课程主页:http://cs231n.stanford.edu/ ? Introduction to neural networks -Training Neural Network ______________________________________________________________________________________________________________________________________________________________

(转)A Beginner's Guide To Understanding Convolutional Neural Networks

Adit Deshpande CS Undergrad at UCLA ('19) Blog About A Beginner's Guide To Understanding Convolutional Neural Networks Introduction Convolutional neural networks. Sounds like a weird combination of biology and math with a little CS sprinkled in, but

A Beginner's Guide To Understanding Convolutional Neural Networks(转)

A Beginner's Guide To Understanding Convolutional Neural Networks Introduction Convolutional neural networks. Sounds like a weird combination of biology and math with a little CS sprinkled in, but these networks have been some of the most influential

Image Scaling using Deep Convolutional Neural Networks

Image Scaling using Deep Convolutional Neural Networks This past summer I interned at Flipboard in Palo Alto, California. I worked on machine learning based problems, one of which was Image Upscaling. This post will show some preliminary results, dis

Recurrent Neural Networks Tutorial, Part 1 – Introduction to RNNs

Recurrent Neural Networks Tutorial, Part 1 – Introduction to RNNs Recurrent Neural Networks (RNNs) are popular models that have shown great promise in many NLP tasks. But despite their recent popularity I’ve only found a limited number of resources t

Introduction to Deep Neural Networks

Introduction to Deep Neural Networks Neural networks are a set of algorithms, modeled loosely after the human brain, that are designed to recognize patterns. They interpret sensory data through a kind of machine perception, labeling or clustering raw

On Explainability of Deep Neural Networks

On Explainability of Deep Neural Networks « Learning F# Functional Data Structures and Algorithms is Out! On Explainability of Deep Neural Networks During a discussion yesterday with software architect extraordinaire David Lazar regarding how everyth

(转)A Beginner's Guide To Understanding Convolutional Neural Networks Part 2

Adit Deshpande CS Undergrad at UCLA ('19) Blog About A Beginner's Guide To Understanding Convolutional Neural Networks Part 2 Introduction Link to Part 1 In this post, we’ll go into a lot more of the specifics of ConvNets. Disclaimer: Now, I do reali

【原创】梵高油画用深度卷积神经网络迭代十万次是什么效果? A neural style of convolutional neural networks

作为一个脱离了低级趣味的码农,春节假期闲来无事,决定做一些有意思的事情打发时间,碰巧看到这篇论文: A neural style of convolutional neural networks,译作卷积神经网络风格迁移. 这不是“暮光女”克里斯丁的研究方向吗?!连好莱坞女星都开始搞人工智能发paper,真是热的可见一斑! 这篇文章中讲述了如何用深层卷积神经网络来将一张普通的照片转化成一幅艺术风格的画作(比如梵高的星夜),可以看做是DL(deep learning)在NPR(非真实渲染non p