神经网络训练数据归一化与运行时输入数据
Neural Network training data normalisation vs. runtime input data
我开始学习神经网络,并且遇到了数据标准化。我了解它的必要性,但我不太清楚一旦我的模型在现场接受训练后如何处理我的数据。
假设我获取输入数据,减去其均值并除以标准差。然后我将其作为输入并训练我的神经网络。
进入现场后,如何处理我想要预测的输入样本?
我是否需要保留我的训练数据均值和标准差并使用它们进行标准化?
正确。用于规范化训练数据的均值和标准差与用于规范化测试数据的均值和标准差相同(即,不计算测试数据的均值和标准差)。
希望这篇link能给你更多有用的信息:http://cs231n.github.io/neural-networks-2/
An important point to make about the preprocessing is that any preprocessing statistics (e.g. the data mean) must only be computed on the training data, and then applied to the validation / test data. E.g. computing the mean and subtracting it from every image across the entire dataset and then splitting the data into train/val/test splits would be a mistake. Instead, the mean must be computed only over the training data and then subtracted equally from all splits (train/val/test).
我开始学习神经网络,并且遇到了数据标准化。我了解它的必要性,但我不太清楚一旦我的模型在现场接受训练后如何处理我的数据。
假设我获取输入数据,减去其均值并除以标准差。然后我将其作为输入并训练我的神经网络。
进入现场后,如何处理我想要预测的输入样本?
我是否需要保留我的训练数据均值和标准差并使用它们进行标准化?
正确。用于规范化训练数据的均值和标准差与用于规范化测试数据的均值和标准差相同(即,不计算测试数据的均值和标准差)。
希望这篇link能给你更多有用的信息:http://cs231n.github.io/neural-networks-2/
An important point to make about the preprocessing is that any preprocessing statistics (e.g. the data mean) must only be computed on the training data, and then applied to the validation / test data. E.g. computing the mean and subtracting it from every image across the entire dataset and then splitting the data into train/val/test splits would be a mistake. Instead, the mean must be computed only over the training data and then subtracted equally from all splits (train/val/test).