MCPcopy Create free account
hub / github.com/csuhan/OneLLM / PairRandomResizedCrop

Class PairRandomResizedCrop

data/data_utils.py:29–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29class PairRandomResizedCrop(transforms.RandomResizedCrop):
30 def forward(self, imgs):
31 i, j, h, w = self.get_params(imgs[0], self.scale, self.ratio)
32 return [F.resized_crop(img, i, j, h, w, self.size, self.interpolation, antialias=self.antialias) for img in imgs]
33
34
35class PairToTensor(transforms.ToTensor):

Callers 1

data_utils.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected