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

Function get_manual_loader

train.py:42–50  ·  view source on GitHub ↗
(dataset, data_path, batch_size)

Source from the content-addressed store, hash-verified

40
41
42def get_manual_loader(dataset, data_path, batch_size):
43 with open(data_path, 'rb') as f:
44 man_dataset = pickle.load(f)
45 trans = utils.get_transforms(dataset, train=True, is_tensor=False)
46
47 man_dataset = utils.Dataset( man_dataset['x'], man_dataset['y'].astype(np.int64), trans )
48 loader = utils.Loader(man_dataset, batch_size=batch_size, shuffle=True, drop_last=True)
49
50 return loader
51
52
53def save_checkpoint(save_dir, save_name, model, optim, log):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected