Fix bug that rendered StochasticLayerWithParameters un-updatable
This commit is contained in:
parent
d48cb9214c
commit
309f96b8f5
@ -131,7 +131,7 @@ class MultipleLayerModel(object):
|
|||||||
inputs = activations[-i - 2]
|
inputs = activations[-i - 2]
|
||||||
outputs = activations[-i - 1]
|
outputs = activations[-i - 1]
|
||||||
grads_wrt_inputs = layer.bprop(inputs, outputs, grads_wrt_outputs)
|
grads_wrt_inputs = layer.bprop(inputs, outputs, grads_wrt_outputs)
|
||||||
if isinstance(layer, LayerWithParameters):
|
if isinstance(layer, LayerWithParameters) or isinstance(layer, StochasticLayerWithParameters):
|
||||||
grads_wrt_params += layer.grads_wrt_params(
|
grads_wrt_params += layer.grads_wrt_params(
|
||||||
inputs, grads_wrt_outputs)[::-1]
|
inputs, grads_wrt_outputs)[::-1]
|
||||||
grads_wrt_outputs = grads_wrt_inputs
|
grads_wrt_outputs = grads_wrt_inputs
|
||||||
|
Loading…
Reference in New Issue
Block a user