File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3677,15 +3677,19 @@ class GaussianNoiseLayer(Layer):
36773677 def __init__ (
36783678 self ,
36793679 layer = None ,
3680- # keep = 0.5 ,
3680+ sigma = 0.1 ,
36813681 name = 'gaussian_noise_layer' ,
36823682 ):
36833683 Layer .__init__ (self , name = name )
36843684 self .inputs = layer .outputs
36853685 print (" tensorlayer:Instantiate GaussianNoiseLayer %s: keep: %f" % (self .name , keep ))
36863686 print (" Waiting for contribution" )
36873687 with tf .variable_scope (name ) as vs :
3688- pass
3688+ noisy = np .random .normal (0.0 , sigma , tf .to_int64 (input_layer ).get_shape ())
3689+ self .inputs = self .inputs + noisy
3690+ self .all_layers = list (layer .all_layers )
3691+ self .all_params = list (layer .all_params )
3692+ self .all_drop = dict (layer .all_drop )
36893693
36903694
36913695
You can’t perform that action at this time.
0 commit comments