preprocessing.py 文件源码

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

项目:deepjets 作者: deepjets 项目源码 文件源码
def preprocess(subjets, constits, edges,
               cutoff=0.1,
               rotate=True,
               reflect=True,
               zoom=False,
               out_width=25,
               normalize=True):
    translate(constits, subjets)
    image = pixelize(constits, edges)
    if rotate:
        image = rotate_image(image, subjets)
    if reflect:
        image = reflect_image(image, subjets)
    image = zoom_image(image, zoom if zoom is not False else 1., out_width)
    if normalize:
        image = normalize_image(image)
    return image
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号