@@ -82,31 +82,31 @@ def test_reproduce_ranzato_hinton_2010(dataset='MAR',
8282 if print_jj :
8383 tile (imgs_fn (jj ), "imgs_%06i.png" % jj )
8484 if persistent_chains :
85- tile (smplr .positions .value , "sample_%06i.png" % jj )
86- tile (rbm .U .value .T , "U_%06i.png" % jj )
87- tile (rbm .W .value .T , "W_%06i.png" % jj )
85+ tile (smplr .positions .get_value ( borrow = True ) , "sample_%06i.png" % jj )
86+ tile (rbm .U .get_value ( borrow = True ) .T , "U_%06i.png" % jj )
87+ tile (rbm .W .get_value ( borrow = True ) .T , "W_%06i.png" % jj )
8888
8989 print 'saving samples' , jj , 'epoch' , jj / (epoch_size / batchsize )
9090
91- print 'l2(U)' , l2 (rbm .U .value ),
92- print 'l2(W)' , l2 (rbm .W .value ),
91+ print 'l2(U)' , l2 (rbm .U .get_value ( borrow = True ) ),
92+ print 'l2(W)' , l2 (rbm .W .get_value ( borrow = True ) ),
9393 print 'l1_penalty' ,
9494 try :
95- print trainer .effective_l1_penalty .value
95+ print trainer .effective_l1_penalty .get_value ()
9696 except :
9797 print trainer .effective_l1_penalty
9898
99- print 'U min max' , rbm .U .value .min (), rbm .U .value .max (),
100- print 'W min max' , rbm .W .value .min (), rbm .W .value .max (),
101- print 'a min max' , rbm .a .value .min (), rbm .a .value .max (),
102- print 'b min max' , rbm .b .value .min (), rbm .b .value .max (),
103- print 'c min max' , rbm .c .value .min (), rbm .c .value .max ()
99+ print 'U min max' , rbm .U .get_value ( borrow = True ) .min (), rbm .U .get_value ( borrow = True ) .max (),
100+ print 'W min max' , rbm .W .get_value ( borrow = True ) .min (), rbm .W .get_value ( borrow = True ) .max (),
101+ print 'a min max' , rbm .a .get_value ( borrow = True ) .min (), rbm .a .get_value ( borrow = True ) .max (),
102+ print 'b min max' , rbm .b .get_value ( borrow = True ) .min (), rbm .b .get_value ( borrow = True ) .max (),
103+ print 'c min max' , rbm .c .get_value ( borrow = True ) .min (), rbm .c .get_value ( borrow = True ) .max ()
104104
105105 if persistent_chains :
106- print 'parts min' , smplr .positions .value .min (),
107- print 'max' ,smplr .positions .value .max (),
108- print 'HMC step' , smplr .stepsize .value ,
109- print 'arate' , smplr .avg_acceptance_rate .value
106+ print 'parts min' , smplr .positions .get_value ( borrow = True ) .min (),
107+ print 'max' ,smplr .positions .get_value ( borrow = True ) .max (),
108+ print 'HMC step' , smplr .stepsize .get_value () ,
109+ print 'arate' , smplr .avg_acceptance_rate .get_value ()
110110
111111
112112 l2_of_Ugrad = learn_fn (jj )
0 commit comments