MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / np2pt

Method np2pt

ldm/data/util.py:15–17  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

13 return x
14
15 def np2pt(self, x):
16 x = torch.from_numpy(x) * 2 - 1.
17 return x
18
19 def __call__(self, sample):
20 # sample['jpg'] is tensor hwc in [-1, 1] at this point

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected