示例#1
0
 def numpy_apply_policies(arglist):
     x, policies, cutout = arglist
     return np.stack([
         augmentations.cutout_numpy(augmentations.apply_policy(policy, y),
                                    size=int(0.01 * cutout *
                                             min(y.shape[:2])))
         for y, policy in zip(x, policies)
     ]).astype('f')
示例#2
0
def numpy_apply_policy(x, policy):
    return augmentations.apply_policy(policy, x).astype('f')
示例#3
0
 def numpy_apply_policies(arglist):
     x, policies = arglist
     return np.stack([augmentations.cutout_numpy(augmentations.apply_policy(policy, y)) for y, policy in
                      zip(x, policies)]).astype('f')