Junior — Middle
What fundamental component is at the core of neural networks?
sobes.tech AI
Answer from AI
The fundamental component of neural networks is the neuron (artificial neuron) — a computational element that takes several input signals, applies weights to them, sums them up, adds a bias, and passes the result through an activation function.
Main parts of a neuron:
- Inputs with weights
- Summator: calculates the weighted sum of inputs
- Activation function: a nonlinear function, such as ReLU, sigmoid, or tanh
Example of a simple neuron in Python:
import numpy as np
def neuron(inputs, weights, bias):
total = np.dot(inputs, weights) + bias
output = 1 / (1 + np.exp(-total)) # sigmoid
return output
inputs = np.array([0.5, 0.3])
weights = np.array([0.9, -0.7])
bias = 0.1
print(neuron(inputs, weights, bias))
Thus, a neuron is a basic building block from which layers and the entire neural network are constructed.