コード例 #1
0
ファイル: main.py プロジェクト: ChrisWess/myN2N
 def infer_image(args):
     """Infering a chosen image to a trained and pickled network."""
     if args.image is None:
         error('Must specify image file with --image')
     if args.out is None:
         error('Must specify output image file with --out')
     if args.network_snapshot is None:
         error('Must specify trained network filename with --network-snapshot')
     # Note: there's no dnnlib.submission.submit_run here. This is for quick interactive
     # testing, not for long-running training or validation runs.
     validation.infer_image(tf_config, args.network_snapshot, args.image, args.out)
コード例 #2
0
 def infer_image(in_args):
     if submit_config.submit_target != dnnlib.SubmitTarget.LOCAL:
         print('Command line overrides currently supported only in local runs for the validate subcommand')
         sys.exit(1)
     if in_args.image is None:
         error('Must specify image file with --image')
     if in_args.out is None:
         error('Must specify output image file with --out')
     if in_args.network_snapshot is None:
         error('Must specify trained network filename with --network-snapshot')
     # Note: there's no dnnlib.submission.submit_run here. This is for quick interactive
     # testing, not for long-running training or validation runs.
     validation.infer_image(in_args.network_snapshot, in_args.image, in_args.out)