frru_model.py 文件源码

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

项目:woipv 作者: Panaetius 项目源码 文件源码
def __conv(self, input, kernel, strides=[1, 1, 1, 1], nonlinearity=True, batch_norm=True, name="conv"):
        with tf.variable_scope(name) as scope:
            kernel = tf.get_variable('weights',
                                                shape=kernel,
                                              initializer=xavier_initializer(
                                                  dtype=tf.float32),
                                              dtype=tf.float32)
            conv = tf.nn.conv2d(input, kernel, strides, padding='SAME')

            if batch_norm:
                conv = self.__batch_norm_wrapper(conv)

            if nonlinearity:
                conv = tf.nn.elu(conv, name=scope.name)

            return conv
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号