-
Notifications
You must be signed in to change notification settings - Fork 39
/
entrypoint_eval.py
executable file
·39 lines (27 loc) · 1.29 KB
/
entrypoint_eval.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import argparse
import sys
from functions.evaluator import Evaluator
from options import update_options, options, reset_options
def parse_args():
parser = argparse.ArgumentParser(description='Pixel2Mesh Evaluation Entrypoint')
parser.add_argument('--options', help='experiment options file name', required=False, type=str)
args, rest = parser.parse_known_args()
if args.options is None:
print("Running without options file...", file=sys.stderr)
else:
update_options(args.options)
parser.add_argument('--batch-size', help='batch size', type=int)
parser.add_argument('--shuffle', help='shuffle samples', default=False, action='store_true')
parser.add_argument('--checkpoint', help='trained checkpoint file', type=str, required=True)
parser.add_argument('--version', help='version of task (timestamp by default)', type=str)
parser.add_argument('--name', help='subfolder name of this experiment', required=True, type=str)
parser.add_argument('--gpus', help='number of GPUs to use', type=int)
args = parser.parse_args()
return args
def main():
args = parse_args()
logger, writer = reset_options(options, args, phase='eval')
evaluator = Evaluator(options, logger, writer)
evaluator.evaluate()
if __name__ == "__main__":
main()