From the course: Training Neural Networks in Python

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Challenge: Logic gates with perceptrons

Challenge: Logic gates with perceptrons - Python Tutorial

From the course: Training Neural Networks in Python

Challenge: Logic gates with perceptrons

(quirky music) - [Instructor] Ready for your next challenge. Your task is to make your perception behave as a 2 input OR Gate. Here's the truth table for the OR Gate, and this is what the classification problem looks like. So to be clear, what you need to do is come up with a combination of weight that will make the perception behave as an OR Gate. It may help to fill out the Z column of this table first. Remember, you want a negative sum whenever you want the output to be 0, and a positive sum for 1. Go ahead and tweak the code to test your new OR Gate. This shouldn't take you more than 15 minutes, especially because you may use the provided code which is a modification of the AND Gate code you just saw. When you're done, watch the next video for my solution and comments.

Contents