GeezerVison is showing github.com — use the new parameter p instead of prob to remove deprecation warning. · hdubey/DeepLearningTutorials@9153f45
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: code/dA.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -179,7 +179,7 @@ def get_corrupted_input(self, input, corruption_level): | 179 | 179 | is always 0 or 1, this don't change the result. This is needed to allow | 180 | 180 | the gpu to work correctly as it only support float32 for now. | 181 | 181 | """ | 182 | | - return self.theano_rng.binomial( size = input.shape, n = 1, prob = 1 - corruption_level, dtype=theano.config.floatX) * input | | 182 | + return self.theano_rng.binomial( size = input.shape, n = 1, p = 1 - corruption_level, dtype=theano.config.floatX) * input | 183 | 183 |
| 184 | 184 |
| 185 | 185 | def get_hidden_values(self, input): | |
Collapse file Copy file name to clipboardExpand all lines: doc/dA.txt +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -343,7 +343,7 @@ does just that : | 343 | 343 | this will produce an array of 0s and 1s where 1 has a probability of | 344 | 344 | 1 - ``corruption_level`` and 0 with ``corruption_level`` | 345 | 345 | """ | 346 | | - return self.theano_rng.binomial( size = input.shape, n = 1, prob = 1 - corruption_level) * input | | 346 | + return self.theano_rng.binomial( size = input.shape, n = 1, p = 1 - corruption_level) * input | 347 | 347 |
| 348 | 348 |
| 349 | 349 |
| @@ -485,7 +485,7 @@ The final denoising autoencoder class becomes : | 485 | 485 | this will produce an array of 0s and 1s where 1 has a probability of | 486 | 486 | 1 - ``corruption_level`` and 0 with ``corruption_level`` | 487 | 487 | """ | 488 | | - return self.theano_rng.binomial( size = input.shape, n = 1, prob = 1 - corruption_level) * input | | 488 | + return self.theano_rng.binomial( size = input.shape, n = 1, p = 1 - corruption_level) * input | 489 | 489 |
| 490 | 490 |
| 491 | 491 | def get_hidden_values(self, input): | |
Collapse file Copy file name to clipboardExpand all lines: doc/rbm.txt +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -416,7 +416,7 @@ with Eqs. :eq:`rbm_propup` - :eq:`rbm_propdown`. The code is as follows: | 416 | 416 | # Note that theano_rng.binomial returns a symbolic sample of dtype | 417 | 417 | # int64 by default. If we want to keep our computations in floatX | 418 | 418 | # for the GPU we need to specify to return the dtype floatX | 419 | | - h1_sample = self.theano_rng.binomial(size = h1_mean.shape, n = 1, prob = h1_mean, | | 419 | + h1_sample = self.theano_rng.binomial(size = h1_mean.shape, n = 1, p = h1_mean, | 420 | 420 | dtype = theano.config.floatX) | 421 | 421 | return [pre_sigmoid_h1, h1_mean, h1_sample] | 422 | 422 |
| @@ -440,7 +440,7 @@ with Eqs. :eq:`rbm_propup` - :eq:`rbm_propdown`. The code is as follows: | 440 | 440 | # Note that theano_rng.binomial returns a symbolic sample of dtype | 441 | 441 | # int64 by default. If we want to keep our computations in floatX | 442 | 442 | # for the GPU we need to specify to return the dtype floatX | 443 | | - v1_sample = self.theano_rng.binomial(size = v1_mean.shape,n = 1,prob = v1_mean, | | 443 | + v1_sample = self.theano_rng.binomial(size = v1_mean.shape,n = 1,p = v1_mean, | 444 | 444 | dtype = theano.config.floatX) | 445 | 445 | return [pre_sigmoid_v1, v1_mean, v1_sample] | 446 | 446 |
| |
|