Logic Puzzle Platform

Question 1 of 2

The XOR Problem

The XOR (exclusive OR) gate presents a classic problem in neural network research because it cannot be solved by a single-layer perceptron. This is due to the non-linear separability of the XOR function. The XOR function takes two binary inputs (0 or 1) and outputs 1 if exactly one of the inputs is 1, and 0 otherwise

Goal:

  1. Build a sequential model with one hidden layer containing 32 neurons and a relu activation function and another hidden layer with 16 neurons and a relu activation function.
  2. Add an output layer with the correct number of neurons and a sigmoid activation function for binary classification.
  3. Compile the model using binaryCrossentropy for loss.
  4. Train the model on the provided XOR Dataset (inputs `X` and outputs `Y`).
  5. Evaluate the model on the `to_predict` tensor.

Expected Output:

Tensor Data -> Shape: [1, 1] | Values: [[1]]

Build Your Solution

Output

Status:
Ready

Results

🧠 AI/ML Challenge

Build blocks, then run code to test your neural network

1 / 2