GeezerVison is showing github.com — Small adjustments to inclusion of code in ReStructuredText files. · iamsile/DeepLearningTutorials@899adfd
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/hmc/hmc.py +15-9Lines changed: 15 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -321,15 +321,21 @@ def __init__(self, **kwargs): | 321 | 321 | self.__dict__.update(kwargs) | 322 | 322 |
| 323 | 323 | @classmethod | 324 | | - def new_from_shared_positions(cls, shared_positions, energy_fn, | 325 | | - initial_stepsize=0.01, target_acceptance_rate=.9, n_steps=20, | 326 | | - stepsize_dec=0.98, | 327 | | - stepsize_min=0.001, | 328 | | - stepsize_max=0.25, | 329 | | - stepsize_inc=1.02, | 330 | | - # used in geometric avg. 1.0 would be not moving at all | 331 | | - avg_acceptance_slowness=0.9, | 332 | | - seed=12345): | | 324 | + def new_from_shared_positions( | | 325 | + cls, | | 326 | + shared_positions, | | 327 | + energy_fn, | | 328 | + initial_stepsize=0.01, | | 329 | + target_acceptance_rate=.9, | | 330 | + n_steps=20, | | 331 | + stepsize_dec=0.98, | | 332 | + stepsize_min=0.001, | | 333 | + stepsize_max=0.25, | | 334 | + stepsize_inc=1.02, | | 335 | + # used in geometric avg. 1.0 would be not moving at all | | 336 | + avg_acceptance_slowness=0.9, | | 337 | + seed=12345 | | 338 | + ): | 333 | 339 | """ | 334 | 340 | :param shared_positions: theano ndarray shared var with | 335 | 341 | many particle [initial] positions | |
Collapse file Copy file name to clipboardExpand all lines: doc/DBN.txt +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -214,7 +214,7 @@ The few lines of code below constructs the deep belief network : | 214 | 214 |
| 215 | 215 | .. literalinclude:: ../code/DBN.py | 216 | 216 | :start-after: # numpy random generator | 217 | | - :end-before: ######################### | | 217 | + :end-before: start-snippet-2 | 218 | 218 |
| 219 | 219 | There are two stages in training this network: (1) a layer-wise pre-training and | 220 | 220 | (2) a fine-tuning stage. | |
|