File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 66def one_layer (inputs ,
77 outputs_size ,
88 activation_fn = tf .nn .tanh ,
9+ precision = global_tf_float_precision ,
910 stddev = 1.0 ,
1011 bavg = 0.0 ,
1112 name = 'linear' ,
@@ -17,17 +18,17 @@ def one_layer(inputs,
1718 shape = inputs .get_shape ().as_list ()
1819 w = tf .get_variable ('matrix' ,
1920 [shape [1 ], outputs_size ],
20- global_tf_float_precision ,
21+ precision ,
2122 tf .random_normal_initializer (stddev = stddev / np .sqrt (shape [1 ]+ outputs_size ), seed = seed ))
2223 b = tf .get_variable ('bias' ,
2324 [outputs_size ],
24- global_tf_float_precision ,
25+ precision ,
2526 tf .random_normal_initializer (stddev = stddev , mean = bavg , seed = seed ))
2627 hidden = tf .matmul (inputs , w ) + b
2728 if activation_fn != None and use_timestep :
2829 idt = tf .get_variable ('idt' ,
2930 [outputs_size ],
30- global_tf_float_precision ,
31+ precision ,
3132 tf .random_normal_initializer (stddev = 0.001 , mean = 0.1 , seed = seed ))
3233 if activation_fn != None :
3334 if useBN :
You can’t perform that action at this time.
0 commit comments