Skip to content

Commit 87c634d

Browse files
committed
using normal initializer instead of xavier
1 parent 4a52267 commit 87c634d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common/tools_networks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from tools_general import np, tf
22

33
def deconv(X, is_training, kernel_w, stride, Cout, epf=None, trainable=True, act='ReLu', norm=None, name='deconv'):
4-
''' epf is the expansion factor. when used padding with we SAME
4+
''' epf is the expansion factor. when used padding will be SAME
55
'''
66
in_shape = X.get_shape().as_list()
77
in_shape2 = tf.shape(X)
@@ -170,8 +170,8 @@ def weight_variable(shape, name=None, trainable=True):
170170
shape: HxWxCinxCout
171171
"""
172172
with tf.device('/gpu:0'):
173-
return tf.get_variable(name=name, shape=shape, dtype=tf.float32, trainable=trainable, initializer=tf.contrib.layers.xavier_initializer())
174-
#return tf.get_variable(name=name, shape=shape, dtype=tf.float32, trainable=trainable, initializer=tf.truncated_normal_initializer(stddev=0.02))
173+
#return tf.get_variable(name=name, shape=shape, dtype=tf.float32, trainable=trainable, initializer=tf.contrib.layers.xavier_initializer())
174+
return tf.get_variable(name=name, shape=shape, dtype=tf.float32, trainable=trainable, initializer=tf.truncated_normal_initializer(stddev=0.02))
175175
def regularization(variables, regtype='L1', regcoef=0.1):
176176
regs = tf.constant(0.0)
177177
for var in variables:

0 commit comments

Comments
 (0)