File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -321,15 +321,21 @@ def __init__(self, **kwargs):
321321 self .__dict__ .update (kwargs )
322322
323323 @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+ ):
333339 """
334340 :param shared_positions: theano ndarray shared var with
335341 many particle [initial] positions
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 :
214214
215215.. literalinclude:: ../code/DBN.py
216216 :start-after: # numpy random generator
217- :end-before: #########################
217+ :end-before: start-snippet-2
218218
219219There are two stages in training this network: (1) a layer-wise pre-training and
220220(2) a fine-tuning stage.
You can’t perform that action at this time.
0 commit comments