MCPcopy Create free account
hub / github.com/CausalLearning/robust-unlearnable-examples / __init__

Method __init__

utils/data.py:58–62  ·  view source on GitHub ↗
(self, x, y, transform=None)

Source from the content-addressed store, hash-verified

56
57class IndexedDataset():
58 def __init__(self, x, y, transform=None):
59 self.x = x
60 self.y = y
61 self.ii = np.array( range(len(x)), dtype=np.int64 )
62 self.transform = transform
63
64 def __getitem__(self, idx):
65 x, y, ii = Image.fromarray(self.x[idx]), self.y[idx], self.ii[idx]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected