MCPcopy Create free account
hub / github.com/bbaaii/DreamDiffusion / __init__

Method __init__

code/dataset.py:345–347  ·  view source on GitHub ↗
(self, size, p)

Source from the content-addressed store, hash-verified

343
344class random_crop:
345 def __init__(self, size, p):
346 self.size = size
347 self.p = p
348 def __call__(self, img):
349 if torch.rand(1) < self.p:
350 return transforms.RandomCrop(size=(self.size, self.size))(img)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected