MCPcopy Create free account
hub / github.com/Alpha-VLLM/LLaMA2-Accessory / T_padded_resize

Function T_padded_resize

accessory/data/transform.py:57–65  ·  view source on GitHub ↗
(size=224)

Source from the content-addressed store, hash-verified

55
56
57def T_padded_resize(size=224):
58 t = transforms.Compose([
59 PadToSquare(background_color=(0.48145466, 0.4578275, 0.40821073)),
60 transforms.Resize(
61 size, interpolation=transforms.InterpolationMode.BICUBIC
62 ),
63 transforms.ToTensor(),
64 transforms.Normalize(mean=[0.48145466, 0.4578275, 0.40821073], std=[0.26862954, 0.26130258, 0.27577711])])
65 return t
66
67
68def get_transform(transform_type: str, size=224):

Callers 1

get_transformFunction · 0.70

Calls 1

PadToSquareClass · 0.70

Tested by

no test coverage detected