10.02.2021 Views

Neural Networks from Scratch in Python by Harrison Kinsley, Daniel Kukie a

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2 - Coding Our First Neurons - Neural Networks from Scratch in Python

25

A Batch of Data

To train, neural networks tend to receive data in ​batches.​ So far, the example input data have

been only one sample (or ​observation​) of various features called a feature set:

inputs ​= ​[​1​, ​2​, ​3​, ​2.5​]

Here, the ​[​1​, ​2​, ​3​, ​2.5​]​ ​data are somehow meaningful and descriptive to the output we

desire. Imagine each number as a value from a different sensor, from the example in chapter 1,

all simultaneously. Each of these values is a feature observation datum, and together they form a

feature set instance​, also called an ​observation​, or most commonly, a ​sample​.

Fig 2.11:​ Visualizing a 1D array.

Anim 2.11:​ ​https://nnfs.io/lqw

Often, neural networks expect to take in many ​samples​ at a time for two reasons. One reason

is that it’s faster to train in batches in parallel processing, and the other reason is that batches

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!