Overview
This code implements a simple artifical neural network to simulate an XOR logic gate. The neural network consists of two input nodes (X and Y), three hidden nodes, and an output node.
Description
This program will use the backpropagation algorithm to train itself to produce an XOR output. My goal in making this was to implement backpropagation in LabVIEW. It's not the prettiest code, but I'm hoping it will be useful to people trying to understand how neural networks work. Essentially I implemented the math found in this video, and then applied it using an XOR function for training. The code uses functional global variables (FGVs) heavily to avoid wires going everywhere, so brush up on FGVs if you have not used them before.
For more information on Artificial Neural Networks, I highly recommend watching this series of videos.
Steps to Implement or Execute Code
- Run Neural Network_XOR.vi (this VI will train the neural network)
- Run FeedForward.vi (this VI allows you to test the neural network)
Requirements
Software:
- LabVIEW 2015 (or compatible)
Steps to Implement or Execute Code
- Download the .zip file
- Set your desired configuration (a, x1, x2, degrees, etc)
- Run the VI
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**