GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — small opt when the corruption level is 0. · hdubey/DeepLearningTutorials@5fc2b76

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • code
    • dA.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/dA.py‎

Copy file name to clipboardExpand all lines: code/dA.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ def get_corrupted_input(self, input, corruption_level):
178178
is always 0 or 1, this don't change the result. This is needed to allow
179179
the gpu to work correctly as it only support float32 for now.
180180
"""
181+
if corruption_level==0:
182+
return input
181183
return self.theano_rng.binomial( size = input.shape, n = 1, prob = 1 - corruption_level, dtype=theano.config.floatX) * input
182184

183185

@@ -261,7 +263,7 @@ def test_dA( learning_rate = 0.1, training_epochs = 15, dataset ='mnist.pkl.gz'
261263

262264
train_da = theano.function([index], cost, updates = updates,
263265
givens = {x:train_set_x[index*batch_size:(index+1)*batch_size]})
264-
266+
265267
start_time = time.clock()
266268

267269
############

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.