</>
Skip to content
AI lessons (11/37)

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

FunctionDescription
ReLUrectified linear
Sigmoid0 to 1
Tanh-1 to 1
SoftmaxProbability distribution

Training

model.fit(X_train, y_train, epochs=10, batch_size=32)

Mini Practice

  1. Build neural network
  2. Choose activation functions
  3. Train model
  4. 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.