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

Function get_args

train.py:11–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10
11def get_args():
12 parser = argparse.ArgumentParser()
13 utils.add_shared_args(parser)
14
15 parser.add_argument('--data-mode', type=str, default='mix',
16 choices=['mix', 'clear', 'manual'],
17 help='mix = clear + unlearnable data, clear = clear data only')
18
19 parser.add_argument('--filter', type=str, default=None,
20 choices=['averaging', 'gaussian', 'median', 'bilateral'],
21 help='select the low pass filter; only works in [mix] mode')
22
23 parser.add_argument('--man-data-path', type=str, default=None,
24 help='set the path to the manual dataset')
25 parser.add_argument('--noise-path', type=str, default=None,
26 help='set the path to the train images noises')
27 parser.add_argument('--poi-idx-path', type=str, default=None,
28 help='set the path to the poisoned indices')
29 parser.add_argument('--resume-path', type=str, default=None,
30 help='set where to resume the model')
31
32 parser.add_argument('--perturb-freq', type=int, default=1,
33 help='set the perturbation frequency')
34 parser.add_argument('--report-freq', type=int, default=500,
35 help='set the report frequency')
36 parser.add_argument('--save-freq', type=int, default=5000,
37 help='set the checkpoint saving frequency')
38
39 return parser.parse_args()
40
41
42def get_manual_loader(dataset, data_path, batch_size):

Callers 1

train.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected