def xavier_uniform_dist_conv3d(shape):
with tf.variable_scope('xavier_glorot_initializer'):
denominator = tf.cast((tf.reduce_prod(shape[:3]) * tf.reduce_sum(shape[3:])), tf.float32)
lim = tf.sqrt(6. / denominator)
return tf.random_uniform(shape, minval=-lim, maxval=lim)
评论列表
文章目录