Unverified Commit cf7b98b8 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix `run_clip.py` (#20234)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 683cbc4c
...@@ -198,7 +198,8 @@ class Transform(torch.nn.Module): ...@@ -198,7 +198,8 @@ class Transform(torch.nn.Module):
Normalize(mean, std), Normalize(mean, std),
) )
def forward(self, x: Image) -> torch.Tensor: def forward(self, x) -> torch.Tensor:
"""`x` should be an instance of `PIL.Image.Image`"""
with torch.no_grad(): with torch.no_grad():
x = self.transforms(x) x = self.transforms(x)
return x return x
......
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