Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以在输入层之后立即使用批处理规范化层而不规范化我的数据吗?我可以期望获得类似的效果/性能吗?
在 keras 功能中,它会是这样的:
x = Input (...) x = Batchnorm(...)(x) ...
你能行的。但是,除了激活分布稳定之外,batchnorm 的好处是均值和标准偏差可能会随着网络的学习而迁移。
实际上,在输入层之后设置 batchnorm 是一个花哨的数据预处理步骤。它有时很有帮助(例如在线性回归中)。但是计算整个训练样本的均值和方差一次比逐批学习更容易、更有效。请注意,batchnorm 在性能方面并不是免费的,您不应滥用它。