MCPcopy Create free account
hub / github.com/Chain123/Meta-HAR / dataloader_gen

Function dataloader_gen

utils.py:43–54  ·  view source on GitHub ↗

Args: filename: a list of pickle files that stores the processed HAR data (after FFT) batch_size: batch size train: is for training? target: encoder method for the label: "hot": one-hot encoding, else int number

(filename, batch_size, train=True, target="logits")

Source from the content-addressed store, hash-verified

41
42
43def dataloader_gen(filename, batch_size, train=True, target="logits"):
44 """
45 Args:
46 filename: a list of pickle files that stores the processed HAR data (after FFT)
47 batch_size: batch size
48 train: is for training?
49 target: encoder method for the label: "hot": one-hot encoding, else int number
50 """
51 dataset = data_loader.heter_data(filename, target=target)
52 dataloader = torch.utils.data.DataLoader(dataset, batch_size=batch_size, shuffle=train, num_workers=2,
53 drop_last=True)
54 return dataloader
55
56
57def dataloader_gen2(filename, batch_size, train=True, target="logits"):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…