3. Define the train data and initialize the parameters Let's have training data for a AND gate and initialize the parame

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

3. Define the train data and initialize the parameters Let's have training data for a AND gate and initialize the parame

Post by answerhappygod »

3 Define The Train Data And Initialize The Parameters Let S Have Training Data For A And Gate And Initialize The Parame 1
3 Define The Train Data And Initialize The Parameters Let S Have Training Data For A And Gate And Initialize The Parame 1 (14.87 KiB) Viewed 9 times
3. Define the train data and initialize the parameters Let's have training data for a AND gate and initialize the parameters for an AND gate, where recall that the parameters imply weights such as bias, W1, and W2 for two inputs of an AND gate as we learned in class. For instance, you can define as follows, where "np" stands for "numpy" imported at the #1 step. # AND gate, last one is the output of an AND gate, [Input1, Input2, output] TrainData = np.array([[0,0,0], [0,1,0],[1,0,0],[1,1,1]]) # for AND gate b = np.random.normal(size=(1,)) # bias W1 = np.random.normal(size=(1,)) W2 = np.random.normal(size=(1,))
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply