Fixing use of global rng in DropoutLayer fprop.
This commit is contained in:
parent
9c86d00078
commit
77a96cfc01
@ -577,7 +577,7 @@ class DropoutLayer(StochasticLayer):
|
|||||||
if stochastic:
|
if stochastic:
|
||||||
mask_shape = ((1,) + inputs.shape[1:] if self.share_across_batch
|
mask_shape = ((1,) + inputs.shape[1:] if self.share_across_batch
|
||||||
else inputs.shape)
|
else inputs.shape)
|
||||||
self._mask = (rng.uniform(size=mask_shape) < self.incl_prob)
|
self._mask = (self.rng.uniform(size=mask_shape) < self.incl_prob)
|
||||||
return inputs * self._mask
|
return inputs * self._mask
|
||||||
else:
|
else:
|
||||||
return inputs * self.incl_prob
|
return inputs * self.incl_prob
|
||||||
|
Loading…
Reference in New Issue
Block a user