liveBook · Manning

Neural network

As explained in Local Image Generation

A neural network is a machine-learning model composed of interconnected computational units that transform inputs through weighted operations and activation functions.

A neural network is a machine-learning approach built from connected computational nodes. It transforms incoming values by applying weights, combining the results, and passing them through an activation function. Machine learning sits within artificial intelligence, while neural networks are one specific machine-learning approach. section 4.1 section 14.1.1

The basic mechanism is small enough to calculate by hand:

  • Feed values into the network, such as A and B set to -1 for off or 1 for on. section 4.1.3
  • Multiply each input by its corresponding weight, then combine the weighted values. section 4.1.3 section 14.1.1
  • Apply an activation function; the simple example returns zero for a negative result and otherwise returns the sum. section 4.1.3
  • Pass outputs into further nodes in larger networks, where many interconnected weights perform the useful work. section 14.1.1

A tiny AND detector

Give A and B weights of 0.5. When both inputs are on, the weighted sum is 1, so the activation returns 1. If either input is off, the sum is 0 or negative, so the network returns 0. This simple behavior illustrates the larger pattern: weights and activation functions convert inputs into an output. section 4.1.3

Large neural networks are often called deep learning systems. Their human-neuron inspiration is an architectural analogy, not a claim that they reproduce human brains. In Stable Diffusion, a large neural network called a U-NET uses learned parameters, also called weights, to help denoise a random image until it matches a prompt. section 4.1.3 section 5.0

Figure 4.1 Visualizing the hierarchy of AI related terms

Use the hierarchy diagram to distinguish artificial intelligence, machine learning, and neural networks. section 4.1

How Local Image Generation covers it

How deep it goes
Explains weighted inputs and activation through a hand-worked AND detector, then stops short of detailed training mechanics.
Examples
Uses a two-input AND detector, binary on/off values, weighted sums, activation outputs, and Stable Diffusion denoising.
What you can do after
Evaluate how weights and activation functions turn inputs into outputs and identify their role in Stable Diffusion models.
How it connects
Connects neural networks to artificial intelligence, machine learning, deep learning, Stable Diffusion, U-NETs, and model checkpoints.

Also explained in

Compare how 11 books explain neural network →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Local Image Generation. The section links point to the parts of the book it draws on.