MCPcopy Create free account
hub / github.com/CompVis/zigma / hflip

Function hflip

datasets/video_utils.py:186–195  ·  view source on GitHub ↗

Args: clip (torch.tensor): Video clip to be normalized. Size is (T, C, H, W) Returns: flipped clip (torch.tensor): Size is (T, C, H, W)

(clip)

Source from the content-addressed store, hash-verified

184
185
186def hflip(clip):
187 """
188 Args:
189 clip (torch.tensor): Video clip to be normalized. Size is (T, C, H, W)
190 Returns:
191 flipped clip (torch.tensor): Size is (T, C, H, W)
192 """
193 if not _is_tensor_video_clip(clip):
194 raise ValueError("clip should be a 4D torch.tensor")
195 return clip.flip(-1)
196
197
198class RandomCropVideo:

Callers 1

__call__Method · 0.85

Calls 1

_is_tensor_video_clipFunction · 0.85

Tested by

no test coverage detected