Skip to content

Commit c06b746

Browse files
committed
Merge branch 'patch-1' of https://github.com/the-moliver/keras into the-moliver-patch-1
2 parents bc05a25 + f0aedaf commit c06b746

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keras/layers/noise.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_config(self):
2222
return {"name":self.__class__.__name__,
2323
"sigma":self.sigma}
2424

25-
class GaussianDropout(Layer):
25+
class GaussianDropout(MaskedLayer):
2626
'''
2727
Multiplicative Gaussian Noise
2828
Reference:
@@ -38,7 +38,7 @@ def get_output(self, train):
3838
X = self.get_input(train)
3939
if train:
4040
# self.p refers to drop probability rather than retain probability (as in paper) to match Dropout layer syntax
41-
X *= srng.normal(size=X.shape, avg=1.0, std=T.sqrt(self.p / (1.0 - self.p)), dtype=theano.config.floatX)
41+
X *= srng.normal(size=X.shape, avg=1.0, std=theano.tensor.sqrt(self.p / (1.0 - self.p)), dtype=theano.config.floatX)
4242
return X
4343

4444
def get_config(self):

0 commit comments

Comments
 (0)