MCPcopy Create free account
hub / github.com/PKU-ASAL/Simulated-Data / Loader

Class Loader

src/Sysdig/Loader.py:4–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import json
3import numpy as np
4class Loader(torch.utils.data.Dataset):
5 def __init__(self):
6 super(Loader, self).__init__()
7 self.dataset = ''
8 self.idx2processnum = []
9
10 def __len__(self):
11 return len(self.dataset)
12
13 def __getitem__(self, idx):
14 data = self.dataset[self.idx2processnum[idx]]
15 return data
16
17class Train_Loader(Loader):
18 def __init__(self, path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected