frame_level_models.py 文件源码

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

项目:u8m_test 作者: hxkk 项目源码 文件源码
def fc_layer(self, bottom, out_size, name):
        with tf.variable_scope(name):
            _, _height, _width, _channel = bottom.get_shape().as_list() 
            size = _height*_width*_channel
            weights = tf.get_variable(name=name + "_weights", shape = [size, out_size], initializer=init_ops.random_normal_initializer(stddev=0.01))
            biases = tf.get_variable(name=name + "_biases", shape=[out_size], initializer=init_ops.random_normal_initializer(stddev=0.01)) 
            print weights
            x = tf.reshape(bottom, [-1, size])
            fc = tf.nn.bias_add(tf.matmul(x, weights), biases)
            return fc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号