Skip to content

This Python code implements a simple neural network with one input layer, one hidden layer, and one output layer. The neural network is initialized with random weights and uses the sigmoid activation function. It is capable of both querying (forward pass) and training (backpropagation) processes.

Notifications You must be signed in to change notification settings

Hosein1358/Neural-Network-Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Neural-Network-Implementation

This Python code implements a simple neural network with one input layer, one hidden layer, and one output layer. The neural network is initialized with random weights and uses the sigmoid activation function. It is capable of both querying (forward pass) and training (backpropagation) processes.

Files:

  • NeuralNetwork.py: Python script containing the implementation of the neural network class.
  • README.md: Markdown file containing instructions, description, and usage details.

Instructions:

  • Define the parameters for the neural network: input nodes, hidden nodes, output nodes, and learning rate.
  • Initialize the neural network object with these parameters.
  • Query the neural network to obtain output for the given input.
  • Train the neural network using the train() method with input and target values.

Code Overview:

  • NeuralNetwork class: Defines the neural network structure and methods for querying and training.

  • Initialization: Initializes the neural network with given parameters and random weights.

  • Query method: Performs forward pass to obtain output for a given input.

  • Train method: Implements backpropagation algorithm to update weights based on input and target values.

  • Usage Example: Demonstrates how to create and utilize the neural network object.

    image

Notes:

  • This implementation assumes a basic understanding of neural networks and backpropagation algorithms.
  • Feel free to modify the code as per your requirements or extend it for more complex neural network architectures.
  • For a detailed understanding of the code functionality, refer to the comments provided within the code.

About

This Python code implements a simple neural network with one input layer, one hidden layer, and one output layer. The neural network is initialized with random weights and uses the sigmoid activation function. It is capable of both querying (forward pass) and training (backpropagation) processes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published