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

Class ElementWiseTransform

utils/data.py:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class ElementWiseTransform():
10 def __init__(self, trans=None):
11 self.trans = trans
12
13 def __call__(self, x):
14 if self.trans is None: return x
15 return torch.cat( [self.trans( xx.view(1, *xx.shape) ) for xx in x] )
16
17
18class IndexedTensorDataset():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected