MCPcopy Create free account
hub / github.com/00why00/JoDiffusion / __call__

Method __call__

train_ae.py:275–280  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

273 self.ignore_label = ignore_label
274
275 def __call__(self, x):
276 ignore_mask = x == self.ignore_label
277 x = torch.bitwise_right_shift(x, torch.arange(self.n, device=x.device)[:, None, None])
278 x = torch.remainder(x, 2).float()
279 x[:, ignore_mask] = self.fill_value
280 return x, ignore_mask
281
282def make_train_dataset(args, accelerator):
283 dataset = load_dataset(f"../dataset/{args.dataset_name}.py", trust_remote_code=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected