Define
・Introduction to the XOR Gate Downside
・Establishing a 2-Layer Neural Community
・Ahead Propagation
・Chain Guidelines for Backpropagation
・Implementation with NumPy
・Evaluating Outcomes with PyTorch
・Abstract
・References
Introduction to the XOR Gate Downside
The XOR (unique OR) gate drawback is taken into account easy for a neural community as a result of it entails studying a easy sample of relationships between inputs and outputs {that a} correctly designed community can seize, although it’s not linearly separable (which means you’ll be able to’t draw a single straight line to separate the outputs into two teams primarily based on inputs). Neural networks, significantly these with hidden layers, are able to studying non-linear patterns.
Let’s take a look at the inputs and outputs of XOR Gate. Right here is our 4 coaching knowledge.
Establishing a 2-Layer Neural Community
we use the simplest 2-layer totally related Neural Community for example to unravel the XOR Gate drawback. Right here is the construction of this community. The enter layer has j nodes, j = 2 in our case. the hidden layer has i nodes, i = 4. The output layer has okay nodes, okay = 1.
Ahead Propagation: Key Idea: Matrix Calculations!
Understanding Coaching Information and Community Parameters: The enter Information x is represented by a matrix of (2,4). This format is used as a result of we now have 4 coaching examples , and every instance comprises2 inputs.