From 530734384b3d2ee8d41ac8f8594435c38aa67f05 Mon Sep 17 00:00:00 2001 From: that-ar-guy Date: Fri, 7 Feb 2025 11:04:09 +0530 Subject: [PATCH] added and gate --- .../and-gate-using-neural-network.md | 144 ++++++++++++++++++ docs/projects/deep-learning/index.md | 8 + 2 files changed, 152 insertions(+) create mode 100644 docs/projects/deep-learning/and-gate-using-neural-network.md diff --git a/docs/projects/deep-learning/and-gate-using-neural-network.md b/docs/projects/deep-learning/and-gate-using-neural-network.md new file mode 100644 index 00000000..054d56c4 --- /dev/null +++ b/docs/projects/deep-learning/and-gate-using-neural-network.md @@ -0,0 +1,144 @@ +# 📜 AND Gate Implementation Using a Simple Neural Network + +
+ +
+ +## 🎯 AIM +To develop a simple neural network that mimics the behavior of an AND gate using a perceptron model. + + +## 📊 DATASET LINK +NOT USED + + +## 📓 KAGGLE NOTEBOOK + +[https://www.kaggle.com/code/thatarguy/and-gate-using-simple-neural-network](https://www.kaggle.com/code/thatarguy/and-gate-using-simple-neural-network) + +??? Abstract "Kaggle Notebook" + + + +## ⚙️ TECH STACK + +| **Category** | **Technologies** | +|--------------------------|---------------------------------------------| +| **Languages** | Python | +| **Libraries/Frameworks** | TensorFlow, Keras, Numpy, Matplotlib | +| **Tools** | Kaggle, Jupyter, | + +--- + +## 📝 DESCRIPTION +!!! info "What is the requirement of the project?" + - Develop a minimal neural network that performs binary classification. + - Train a perceptron to correctly compute the AND logic operation. + + +??? info "How is it beneficial and used?" + - Demonstrates how logic gates can be implemented using machine learning. + - Forms a foundation for more complex deep learning projects. + +??? info "How did you start approaching this project? (Initial thoughts and planning)" + - Explored TensorFlow/Keras for implementing simple models. + - Designed a neural network with a single-layer perceptron. + +??? info "Mention any additional resources used (blogs, books, chapters, articles, research papers, etc.)." + - TensorFlow and Keras documentation. + + +--- + +## 🔍 PROJECT EXPLANATION + +### 🛤 PROJECT WORKFLOW + + +!!! success "Project workflow" + + ``` mermaid + graph LR + A[Start] --> C[Create Perceptron Model] + C --> D[Train the Model] + D --> E[Evaluate Performance] + E --> F[End] + ``` + + +=== "Step 1" + - Define the input-output pairs for the AND gate. + +=== "Step 2" + - Implement a single-layer perceptron model. + +=== "Step 3" + - Train the model using supervised learning with gradient descent. + +=== "Step 4" + - Evaluate the model's accuracy in predicting AND gate outputs. + +=== "Step 5" + - Test the trained model with different inputs. + + + +--- + +### 🖥 CODE EXPLANATION +=== "Perceptron Model" + - Implemented using NumPy and TensorFlow/Keras. + - Uses a single-layer neural network with sigmoid activation. + + +--- + +### ⚖️ PROJECT TRADE-OFFS AND SOLUTIONS +=== "Trade Off 1" +- Accuracy vs. Simplicity: A single-layer perceptron is sufficient for the AND gate but cannot handle more complex problems like XOR. +- Solution: Use multi-layer perceptrons for non-linearly separable problems. +--- + +## 🖼 SCREENSHOTS + +!!! example "Model performance graphs" + + === "Training Progress" + ![img](https://vtupulse.com/wp-content/uploads/2020/12/image-21-1024x372.png) + +--- + +## 📉 MODELS USED AND THEIR EVALUATION METRICS + + +| Model | Accuracy | +|------------|----------| +| Perceptron | 100% | + +--- + +## ✅ CONCLUSION + +### 🔑 KEY LEARNINGS +!!! tip "Insights gained from the data" + - Understanding of perceptrons and logic gates.- Implementing simple neural networks. + +??? tip "Improvements in understanding machine learning concepts" + - Learned about activation functions and training neural networks. + +--- + +### 🌍 USE CASES + +=== "Simple AI Applications" + - Basic logic implementations in AI systems. + +=== "Introduction to Neural Networks" + - A stepping stone to more advanced ML applications. diff --git a/docs/projects/deep-learning/index.md b/docs/projects/deep-learning/index.md index 7d210a0f..562f86f8 100644 --- a/docs/projects/deep-learning/index.md +++ b/docs/projects/deep-learning/index.md @@ -11,6 +11,14 @@

📅 2025-01-10 | ⏱️ 10 mins

+ + +
+

AND Gate Implementation Using a Simple Neural Network

+

Deep learning algorithm for image and video recognition.

+

📅 2025-02-06 | ⏱️ 10 mins

+
+