【发布时间】:2019-07-26 05:06:46
【问题描述】:
对于这样的网络架构:
+---+
input1--->| CNN | -------|
+---+ |
|
+---+ +-------+ +-------+
input2--->| CNN | ----| Concat|-----|----| VGG |---- Main_out
+---+ +-------+ | +-------+
| |
+---+ | |
input3--->| CNN | --------| Aux_out
+---+
反向传播流程如何?我的意思是,有两个反向传播步骤?或者来自Main_out 的唯一一个更新权重。
我正在为每个输出使用损失权重:
model.compile(loss="categorical_crossentropy",optimizer=OPT,metrics=["accuracy"],
loss_weights={'main_output': 1., 'aux_output': 0.2}
【问题讨论】:
-
@MatiasValdenegro 当包含 aux_out 时,我有更好的 main_out 准确性。我知道 aux_out 可以帮助解决梯度消失问题。我只是想了解 Keras 在这种情况下如何处理反向传播。像前三个 CNN 权重会更新两次吗?一次从 main_out 更新,另一次从 aux-out 更新?
标签: keras deep-learning backpropagation