The document outlines a Python implementation of an Artificial Neural Network (ANN) using forward and backward propagation. It includes a SimpleNN class with methods for forward propagation, backward propagation, and training the network on a given dataset. The example demonstrates training the ANN on a XOR problem and outputs predictions after training.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
25 views3 pages
Ann Practical 5
The document outlines a Python implementation of an Artificial Neural Network (ANN) using forward and backward propagation. It includes a SimpleNN class with methods for forward propagation, backward propagation, and training the network on a given dataset. The example demonstrates training the ANN on a XOR problem and outputs predictions after training.
for epoch in range(epochs): self.forward(X) self.backward(X, y, learning_rate) if epoch % 1000 == 0: loss = np.mean((y - self.A2) ** 2) print(f"Epoch {epoch}, Loss: {loss}")