segnet_model.py 文件源码

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

项目:woipv 作者: Panaetius 项目源码 文件源码
def __pad_to_size(self, input, target_shape):
        input_shape = tf.shape(input)
        difference = target_shape - input_shape
        offset = tf.cast(tf.zeros_like(difference, dtype=tf.int16), tf.int32)
        padding = tf.concat([tf.expand_dims(difference, axis=1), tf.expand_dims(offset, axis=1)], axis=1)

        return tf.pad(input, padding)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号