Skip to content

Commit

Permalink
Fix issue with compatibility with transform append
Browse files Browse the repository at this point in the history
  • Loading branch information
Eve-ning committed Jun 28, 2024
1 parent 26f1026 commit 872f364
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tests/model_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ def n_rand_strong_aug(size, n_aug: int = 2):


def n_rand_weak_strong_aug(size, n_aug: int = 2):
def f(x):
# x_weak = [weak_0, weak_1, ..., weak_n]
x_weak = n_rand_weak_aug(size, n_aug)(x)
# x_strong = [strong_0, strong_1, ..., strong_n]
x_strong = n_rand_strong_aug(size, n_aug)(x)
# x_paired = [(weak_0, strong_0), (weak_1, strong_1),
# ..., (weak_n, strong_n)]
x_paired = list(zip(*[x_weak, x_strong]))
return x_paired

return f
return Compose(
[
lambda x: list(
zip(
*[
n_rand_weak_aug(size, n_aug)(x),
n_rand_strong_aug(size, n_aug)(x),
]
)
)
]
)


def rand_weak_aug(size: int):
Expand Down

0 comments on commit 872f364

Please sign in to comment.