Unverified Commit 2f32fe82 authored by vfdev's avatar vfdev Committed by GitHub
Browse files

[proto] Added extra_repr to Compose (#6540)

parent 791bc844
...@@ -18,6 +18,12 @@ class Compose(Transform): ...@@ -18,6 +18,12 @@ class Compose(Transform):
sample = transform(sample) sample = transform(sample)
return sample return sample
def extra_repr(self) -> str:
format_string = []
for t in self.transforms:
format_string.append(f" {t}")
return "\n".join(format_string)
class RandomApply(Compose): class RandomApply(Compose):
def __init__(self, transforms: Sequence[Callable], p: float = 0.5) -> None: def __init__(self, transforms: Sequence[Callable], p: float = 0.5) -> None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment