MCPcopy Create free account
hub / github.com/EmbodiedGPT/EmbodiedGPT_Pytorch / build_transform

Function build_transform

robohusky/base_dataset.py:41–48  ·  view source on GitHub ↗
(input_size)

Source from the content-addressed store, hash-verified

39 return False
40
41def build_transform(input_size):
42 transform = T.Compose([
43 T.Lambda(lambda img: img.convert('RGB') if img.mode != 'RGB' else img),
44 T.Resize((input_size, input_size), interpolation=InterpolationMode.BICUBIC),
45 T.ToTensor(),
46 T.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225))
47 ])
48 return transform
49
50def format_inputs(sources):
51 # Apply prompt templates

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected