AI — Neural Networks
What is a Neural Network?
A computing system inspired by biological neural networks.
Basic Structure
Input Layer → Hidden Layers → Output Layer
Simple Neural Network
import tensorflow as tf
model = tf.keras.Sequential([
tf.keras.layers.Dense(64, activation='relu', input_shape=(10,)),
tf.keras.layers.Dense(32, activation='relu'),
tf.keras.layers.Dense(1, activation='sigmoid')
])
model.compile(optimizer='adam',
loss='binary_crossentropy',
metrics=['accuracy'])
Activation Functions
| Function | Description |
|---|---|
| ReLU | rectified linear |
| Sigmoid | 0 to 1 |
| Tanh | -1 to 1 |
| Softmax | Probability distribution |
Training
model.fit(X_train, y_train, epochs=10, batch_size=32)
Mini Practice
- Build neural network
- Choose activation functions
- Train model
- Make predictions
Up Next
Continue with Computer Vision — computer vision.
Related Topics
Frequently Asked Questions about Neural Networks
What is Neural Networks in AI?
Neural Networks is a fundamental concept in AI. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn Neural Networks?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Neural Networks.
Why is Neural Networks important in AI?
Neural Networks is essential for AI development. Understanding this concept will help you write better code and solve real-world problems more effectively.