MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / collate_fn_ours

Function collate_fn_ours

train_vae.py:190–194  ·  view source on GitHub ↗
(examples)

Source from the content-addressed store, hash-verified

188 )
189
190 def collate_fn_ours(examples):
191 pixel_values = torch.stack([example["image"] for example in examples])
192 pixel_values = pixel_values.to(memory_format=torch.contiguous_format).float()
193 batch = {"pixel_values": pixel_values}
194 return batch
195
196 datasets_st = AnyWordLmdbDataset(
197 lmdb_path=cfgs.lmdb_path,

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected