# 前馈神经网络 (FNN)

**前馈神经网络（feedforward neural network，FNN）**: 包含了输入层 Input layer，隐藏层 Hidden layer，和输出层 Output layer。整个网络中无反馈，信号从输入层向输出层单向传播。前馈网络是一种静态非线性映射．通过简单非线性处理 (ReLu激活函数) 的复合映射，可获得复杂的非线性处理能力。

<figure><img src="https://210305681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdoGRjqZjUDh0X608Vw%2Fuploads%2F4oVH4t9m3U4a4WHbasif%2Fimage.png?alt=media&#x26;token=e3b2dd8f-9d56-4216-97ee-aec634602ef0" alt=""><figcaption></figcaption></figure>

#### **优缺点**

* **优点**
  * 结构简单，易于理解和实现，是其他复杂神经网络（如卷积神经网络、循环神经网络）的基础。
  * 适用于处理静态、独立的数据，如图像分类、文本情感分析等。
  * 训练过程明确，可通过反向传播有效优化参数。
* **缺点**
  * 无法处理具有时序依赖或空间结构的数据（如视频、语音），因为缺乏对序列信息的记忆能力。
  * 当隐藏层过多时，可能出现梯度消失或爆炸问题，导致训练困难。
  * 对输入数据的预处理要求较高，需要进行标准化、归一化等操作。

#### **应用场景**

* **图像分类**：如 MNIST 手写数字识别、CIFAR-10 图像分类等，通过多层隐藏层提取图像特征。
* **文本处理**：如文本分类、情感分析，将文本转换为向量后输入网络。
* **回归预测**：如房价预测、股票价格预测等连续值预测任务。
* **数据模式识别**：如信用卡欺诈检测、医疗诊断等，通过学习数据中的模式进行分类。

#### **与其他神经网络的对比**

* **与循环神经网络（RNN）对比**：FNN 无记忆能力，无法处理时序数据；RNN 包含循环连接，可捕获序列中的依赖关系，适用于语音识别、机器翻译等任务。
* **与卷积神经网络（CNN）对比**：FNN 对图像等具有空间结构的数据处理效率低，需大量参数；CNN 通过卷积层和池化层利用局部感知和权值共享，更适合处理图像和视频。
* **与递归神经网络（Recursive NN）对比**：FNN 是分层结构，处理固定长度的输入；递归神经网络可处理树状结构数据（如句法分析树），具有更灵活的结构。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-candy2023.gitbook.io/introduction/ai-candy-on-youtube/ai-ru-men-xi-lie-ke-cheng/qian-kui-shen-jing-wang-luo-fnn.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
