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

Function resize

datasets/video_utils.py:58–65  ·  view source on GitHub ↗
(clip, target_size, interpolation_mode)

Source from the content-addressed store, hash-verified

56
57
58def resize(clip, target_size, interpolation_mode):
59 if len(target_size) != 2:
60 raise ValueError(
61 f"target size should be tuple (height, width), instead got {target_size}"
62 )
63 return torch.nn.functional.interpolate(
64 clip, size=target_size, mode=interpolation_mode, align_corners=False
65 )
66
67
68def resize_scale(clip, target_size, interpolation_mode):

Callers 3

resized_cropFunction · 0.85
__call__Method · 0.85
__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected