Networks Learning Representation

Following a neuro and comparing MLP, CNN, RNN and LSTM according to data structure.

A neural network learns performances that help solve a task. To choose an architecture, note how data are related: positions in a image, steps of a sequence or columns of a table.

Objectives: monitoring the calculation of a neuroone; explain training and backpropagation; Comparison of MLP, CNN, RNN and LSTM and to recognize capacity limits and generalization.

Key concepts

A neuro calculates a weighted sum of inputs, adds a bias and applying a activated function. The weights determine the contribution of each entrance. The activation brings nonlinearity: stacking purely linear transformations does not by itself produce a non-linear border.

The characteristic receives input layer The hidden layers produce intermediate representations. The exit figure represents prediction. To recognize 0 digits to 9, a image 28 × 28 gives 784 values if it's from a channel and pits, and the output can have ten scores.

During training, the network predicts, calculates loss and spreads gradients back (backpropagation). A optimizer uses these gradients to update parameters. A epoch That's a passing through the training set. a batch It's a group processing an update. More periods or more neurons do not better guarantee generalization.

MLP and convolutional networks

A Multilayer Perceptron (MLP) It connects layers of neurons and can learn nonlinear boundaries. In the demonstration of concentric circles, a line does not separate the inner circle from the outside. To add capacity and activations allows a more suitable border The result should be checked at new points.

One Revolutionary Neural Network (CNN) Take advantage of local patterns and share filters about different positions. A kernel crosses regions of the image and produces a feature map. The first layers can respond to edges and textures. Others combine more complex patterns.

ReLU introduces nonlinearity. Pooling reduces space dimensions; does not replace filter training. Final capes combine the characteristics to classify. Softmax converts scores into a class distribution. Dropout randomly deactivates some of the units while training to regularize. doesn't mean permanently eliminating data.

A CNN can be part of classification, detection or segmentation. Classifying identifies categories, detecting adds location and segmenting assigns tags per pixel. They're not equivalent outlays.

Retirement models

One RNN Processes ordered steps and keeps an hidden state. The result of one step has an influence on the next. A complete review that produces a feeling label is many-to-one; an entry that generates a musical sequence, one- to- many; translation between sequences, manand-to- many.

Simple RNN may have difficulties with long dependencies, among other reasons for gradient that fade while training. LSTM add state cell and entrance, oblivion and exit gates. They regulate new, retained and exposed information. It helps to preserve context but doesn't guarantee to remember any length.

Other models solve different objectives: autoencoders they learn how to rebuild inputs through a representation. and GAN face generators and discriminators and transformers They use care and are studied in the following module. Not all networks are trained exclusively with human labels.

Step-by-step example

Suppose a neuro with inputs x1 = 2, x2 = 3, pesos w1 = 0,5, w2 = −1 and bias 1.

  1. Multiples: 2 × 0,5 = 1 y 3 × (−1) = −3.
  2. Add and add bias: 1 − 3 + 1 = −1.
  3. Apply ReLU: max(0, −1) = 0.
  4. During training, compare network output with target, compute loss and adjust parameters with gradients.

In the example of circles, it changes a single variable as a number of neurons and looks at the border. Keep a separate assessment: a curve that perfectly follows training noise can get worse outside.

Common errors

Architecture exercise

You have to detect visual defects in a piece and analyze a temporary series of vibrations. What families would you use as a starting point and what would you evaluate?

Solution

A CNN is a starting point for space patterns in images. For time-ordered vibrations, compare a sequence model as RNN or LSTM with a simple alternative. It evaluates with new images and periods, preventing nearly identical samples from the same equipment from appearing on both sides of the division. The architecture does not replace representative data.

Sources and review

Deep Learning Foundations and demonstration of MLP at official route. Without looking at the table, explain what changes between image classification, objects detection and an output sequence.

Search at CertiTips

12 available courses.