예제 #1
0
#!/usr/bin/env python3.7
from ai.COS import COS
from ai.lib.Envi import Envi
from ai.recipe import Recipe
from ai.visualize import Visualize
from command_line import cmd_options, check_recipe_exists
from logger import init as initlog

initlog('DEBUG')

cmd_options.add_argument('mode', choices=('full', 'zone'), help='zone|full')

args = cmd_options.parse_args()
check_recipe_exists(args.recipe)
recipe = Recipe(args.recipe)

cos = COS(recipe)
envi = Envi(recipe, cos)
viz = Visualize(args.mode, recipe, envi)
viz.run()
예제 #2
0
#!/usr/bin/env python3.7
import logger
from ai.COS import COS
from ai.assemble import Assemble
from ai.lib.Envi import Envi
from ai.recipe import Recipe
from command_line import cmd_options, check_recipe_exists

logger.init()

cmd_options.add_argument('mode',
                         choices=('full', 'zone', 'both'),
                         help='Type of result')
args = cmd_options.parse_args()

check_recipe_exists(args.recipe)

recipe = Recipe(args.recipe)
cos = COS(recipe)
envi = Envi(recipe, cos)

Assemble(args.mode, recipe, envi).run()
예제 #3
0
#!/usr/bin/env python3.7

from ai.process import Process
from ai.recipe import Recipe
from command_line import cmd_options, check_recipe_exists
from logger import init as initlog

initlog('DEBUG')
cmd_options.add_argument('mode',
                         choices=('full', 'zone'),
                         help='Type of result')
cmd_options.add_argument('type',
                         choices=('fit', 'fitpredict', 'predict'),
                         help='Learning type')

args = cmd_options.parse_args()
check_recipe_exists(args.recipe)

recipe = Recipe(args.recipe)

processor = Process(args.mode, args.type, recipe)

processor.run()
예제 #4
0
from ai.visualize import Visualize
from command_line import cmd_options, check_recipe_exists
from logger import init as initlog

initlog('DEBUG')

log = logging.getLogger('main')

# cmd_options.add_argument('mode',
#                          choices=('full', 'zone'),
#                          help='Type of result')
# cmd_options.add_argument('type',
#                          choices=('fit', 'fitpredict', 'predict'),
#                          help='Learning type')

cmd_options.add_argument('--upload-filename', help='Type of result')

args = cmd_options.parse_args()
check_recipe_exists(args.recipe)
recipe = Recipe(args.recipe)

cos = COS(recipe)
envi = Envi(recipe, cos)

if Assemble('both', recipe, envi).run() != 0:
    log.error('Tensor assemble failed')
    exit(-1)

log.info("Learning...")
processor = Process('zone', 'fit', recipe)
if processor.run() != 0: