loading.py 文件源码

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

项目:l3 作者: jacobandreas 项目源码 文件源码
def reconstruct_goal(world):
    # pdb.set_trace()
    world = world.copy()
    ## indices for grass and puddle
    background_inds = [obj['index'] for (name, obj) in library.objects.iteritems() if obj['background']]
    ## background mask
    background = np.in1d(world, background_inds)
    background = background.reshape( (world.shape) )
    ## set backgronud to 0
    world[background] = 0
    ## subtract largest background ind
    ## so indices of objects begin at 1
    world[~background] -= max(background_inds)
    world = np.expand_dims(np.expand_dims(world, 0), 0)
    # pdb.set_trace()
    return world
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号