# Network architecture: 2 -> 4 -> 1 (input -> hidden -> output) input_size = 2 # Number of input features (x and y coordinates) hidden_size = 4 # Number of neurons in hidden layer output_size = 1 # Number of output values (0 or 1) # Initialize weights and biases np.random.seed(42) W1 = np.random.randn(input_size, hidden_size) * 0.5 # Weights: connection strengths between layers b1 = np.zeros((1, hidden_size)) # Biases: adjustable offsets for each neuron W2 = np.random.randn(hidden_size, output_size) * 0.5 # Weights for output layer b2 = np.zeros((1, output_size)) # Bias for output layer print(f"W1 shape: {W1.shape}") # (2, 4) print(f"b1 shape: {b1.shape}") # (1, 4) print(f"W2 shape: {W2.shape}") # (4, 1) print(f"b2 shape: {b2.shape}") # (1, 1)