model.py 文件源码

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

项目:aapm_thoracic_challenge 作者: xf4j 项目源码 文件源码
def crop_and_concat(x1, x2):
    x1_shape = x1.get_shape().as_list()
    x2_shape = x2.get_shape().as_list()
    offsets = [0, (x1_shape[1] - x2_shape[1]) // 2, (x1_shape[2] - x2_shape[2]) // 2, (x1_shape[3] - x2_shape[3]) // 2, 0]
    size = [-1, x2_shape[1], x2_shape[2], x2_shape[3], -1]
    x1_crop = tf.slice(x1, offsets, size)
    return tf.concat([x1_crop, x2], 4)


# Some code from https://github.com/shiba24/3d-unet.git
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号