Python Deep Learning Basics

Python Deep Learning Basics

In this chapter, we’ll explore the fundamentals of deep learning in Python.

Deep Learning Models/Algorithms

Now let’s take a look at different deep learning models/algorithms.

Some popular models in deep learning are as follows

  • Convolutional Neural Networks
  • Recurrent Neural Networks
  • Deep Belief Networks
  • Generative Adversarial Networks
  • Autoencoders, and more.

Inputs and outputs are represented as vectors or tensors. For example, a neural network might have inputs, the RGB values of individual pixels in an image, represented as vectors.

The layers of neurons between the input and output layers are called hidden layers. Most of the work happens here when a neural network tries to solve a problem. A closer look at the hidden layers reveals a lot about the features the network has learned to extract from the data.

Different neural network architectures are formed by choosing which neurons are connected to other neurons in the next layer.

Pseudocode for Calculating Output

The following is pseudocode for calculating the output of a Forward Propagation Neural Network

# node[] := array of topologically sorted nodes
# An edge from a to b means a is to the left of b
# If the Neural Network has R inputs and S outputs,
# then the first R nodes are input nodes and the last S nodes are output nodes.
# incoming[x] := nodes connected to node x
# weight[x] := weights of incoming edges to x

For each neuron x, from left to right –

  • If x <= R: Do nothing # It is an input node
  • inputs[x] = [output[i] for i incoming[x]] Input i
  • weighted_sum = dot_product(weights[x], inputs[x])
  • output[x] = Activation_function(weighted_sum)

Leave a Reply

Your email address will not be published. Required fields are marked *