Question: Here, we will write a function neural_network, which will apply a neural network operation with 2 inputs and 1 output and a given weight matrix.
Here, we will write a function neural_network, which will apply a neural network operation with 2 inputs and 1 output and a given weight matrix.
Available Functions: You have access to the NumPy python library as np
Your function should take two arguments: inputs and weights, two NumPy arrays of shape (2,1) and should return a NumPy array of shape (1,1) , the output of the neural network. Do not forget the tanh activation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
