graph_celeba.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:general-deep-image-completion 作者: adamstseng 项目源码 文件源码
def new_fc_layer( self, bottom, output_size, name ):
        shape = bottom.get_shape().as_list()
        dim = np.prod( shape[1:] )
        x = tf.reshape( bottom, [-1, dim])
        input_size = dim

        with tf.variable_scope(name):
            w = tf.get_variable(
                    "W",
                    shape=[input_size, output_size],
                    initializer=tf.random_normal_initializer(0., 0.005))
            b = tf.get_variable(
                    "b",
                    shape=[output_size],
                    initializer=tf.constant_initializer(0.))
            fc = tf.nn.bias_add( tf.matmul(x, w), b)

        return fc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号