MCPcopy Create free account
hub / github.com/MaureenZOU/TSAM / parse_args

Function parse_args

src/scripts/FVI_checkpoint_compatibility_transform.py:8–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def parse_args():
9 parser = argparse.ArgumentParser(
10 """
11 IMPORTANT NOTE: to run this script, you need to put it under src/ instead of src/scripts
12 due to some unpickling issues of torch.load()
13
14 This script is to modify a checkpoint saved in our previous "FVI with Gated Conv" repository.
15 What it will do:
16 1. Add a "use_skip_connection=True" tag in the "arch/args/opts" entry in the config json.
17 2. Replace names of nn modules that has been changed during the LGTSM development.
18 """
19 )
20 parser.add_argument('--src', type=str, required=True)
21 parser.add_argument('--dst', type=str, required=True)
22 parser.add_argument(
23 '--add_course_net_structures', action='store_true',
24 help='For those older checkpoint, there\'s no "Generator.CourseNet" structures. '
25 'Set this arg to add it manually.')
26 args = parser.parse_args()
27 return args
28
29
30def rename_conv_to_featureConv(checkpoint):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected