Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that simulates a Neural Network where each neuron runs concurrently. We use what is called a multilayer perceptron with 1 hidden layer
Write a program that simulates a Neural Network where each neuron runs concurrently. We use what is called a multilayer perceptron with 1 hidden layer with an input and output layer. The input is a slice of float values and hence the input layer has as many neurons as the length of the slice, the hidden layer has three neurons and there is a single output in the network. Each neuron calculates the weighted sum of its input (including an offset) and applies the sigmoid function o(v) = --- to its output. Consider the Figure below for the example of a slice of size 2. Output Layer Hidden Layer Input Layer Home Layer of In the above example the equation for the first hidden neuron 21 = 0(201 +411X1 + 212X2). The equation for the output neuron is T1 = o(B1 + B1121 + B12Z2 + B1323). The inputs X1 and X2 simply pass their value to all hidden layers. Your program must create the network shown above with the following parameters Q10 = 0.1 du = 0.3 212 = 0.4 A20 = 0.5 021 = 0.8 az2 = 0.3 A 30 = 0.7 431 = 0.6 a32 = 0.6 B10 = 0.5 B11 = 0.3 B12 = 0.7 B 13 = 0.1 You need to design a Go program to calculate the output of the neural network based on input data. The calculation of each neuron must be done in a go routine; the neuron must therefore wait to have received the output values (communicated via a channel) from its input neurons before calculating the value of its output. Your program must apply the neural network to a series of input values in a loop and calculate the network output for the input. These input values are X1.k = sin- os NW k = 0 ... N 1 is the value of the current loop variable. You must make sure that the calculation at " N-and X2, k = cos 21(k-1) wh CSI 2120 page 5 iteration k-1 has been completed before calculating the output value at iteration k. The output value of the network is communicated to the main program via a channel. The main program will have to print the value to console. Your Go program must let the user enter the number of inputs N. Write a program that simulates a Neural Network where each neuron runs concurrently. We use what is called a multilayer perceptron with 1 hidden layer with an input and output layer. The input is a slice of float values and hence the input layer has as many neurons as the length of the slice, the hidden layer has three neurons and there is a single output in the network. Each neuron calculates the weighted sum of its input (including an offset) and applies the sigmoid function o(v) = --- to its output. Consider the Figure below for the example of a slice of size 2. Output Layer Hidden Layer Input Layer Home Layer of In the above example the equation for the first hidden neuron 21 = 0(201 +411X1 + 212X2). The equation for the output neuron is T1 = o(B1 + B1121 + B12Z2 + B1323). The inputs X1 and X2 simply pass their value to all hidden layers. Your program must create the network shown above with the following parameters Q10 = 0.1 du = 0.3 212 = 0.4 A20 = 0.5 021 = 0.8 az2 = 0.3 A 30 = 0.7 431 = 0.6 a32 = 0.6 B10 = 0.5 B11 = 0.3 B12 = 0.7 B 13 = 0.1 You need to design a Go program to calculate the output of the neural network based on input data. The calculation of each neuron must be done in a go routine; the neuron must therefore wait to have received the output values (communicated via a channel) from its input neurons before calculating the value of its output. Your program must apply the neural network to a series of input values in a loop and calculate the network output for the input. These input values are X1.k = sin- os NW k = 0 ... N 1 is the value of the current loop variable. You must make sure that the calculation at " N-and X2, k = cos 21(k-1) wh CSI 2120 page 5 iteration k-1 has been completed before calculating the output value at iteration k. The output value of the network is communicated to the main program via a channel. The main program will have to print the value to console. Your Go program must let the user enter the number of inputs N
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started