MCPcopy Create free account
hub / github.com/OpenBMB/MiniCPM-V / build_transform

Function build_transform

finetune/finetune.py:137–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135
136
137def build_transform():
138 IMAGENET_INCEPTION_MEAN = (0.5, 0.5, 0.5) # timm.data.IMAGENET_INCEPTION_MEAN
139 IMAGENET_INCEPTION_STD = (0.5, 0.5, 0.5) # timm.data.IMAGENET_INCEPTION_STD
140 return transforms.Compose(
141 [
142 transforms.ToTensor(),
143 transforms.Normalize(
144 mean=IMAGENET_INCEPTION_MEAN, std=IMAGENET_INCEPTION_STD
145 ),
146 ]
147 )
148
149def get_parameter_number(model):
150 trainable_params, all_param = 0, 0

Callers 1

trainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected