Skip to content

Commit 0bd1731

Browse files
Yosua Michael Maranathafacebook-github-bot
authored andcommitted
[fbsync] Fixed repr for ElasticTransform (#6758)
Summary: Co-authored-by: Vasilis Vryniotis <[email protected]> Reviewed By: NicolasHug Differential Revision: D40427484 fbshipit-source-id: f4383ec92f59bae0c924aeec3df3f9125fc3ad35
1 parent 0fc3d5d commit 0bd1731

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

torchvision/transforms/transforms.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,9 +2133,9 @@ def forward(self, tensor: Tensor) -> Tensor:
21332133
return F.elastic_transform(tensor, displacement, self.interpolation, self.fill)
21342134

21352135
def __repr__(self):
2136-
format_string = self.__class__.__name__ + "(alpha="
2137-
format_string += str(self.alpha) + ")"
2138-
format_string += ", (sigma=" + str(self.sigma) + ")"
2139-
format_string += ", interpolation={self.interpolation}"
2140-
format_string += ", fill={self.fill})"
2136+
format_string = self.__class__.__name__
2137+
format_string += f"(alpha={self.alpha}"
2138+
format_string += f", sigma={self.sigma}"
2139+
format_string += f", interpolation={self.interpolation}"
2140+
format_string += f", fill={self.fill})"
21412141
return format_string

0 commit comments

Comments
 (0)