Beispiel #1
0
def Run(args):
    # create a Clairvoyante
    logging.info("Loading model ...")
    if args.v2 == True:
        import utils_v2 as utils
        utils.SetupEnv()
        if args.slim == True:
            import clairvoyante_v2_slim as cv
        else:
            import clairvoyante_v2 as cv
    elif args.v3 == True:
        import utils_v2 as utils  # v3 network is using v2 utils
        utils.SetupEnv()
        if args.slim == True:
            import clairvoyante_v3_slim as cv
        else:
            import clairvoyante_v3 as cv
    if args.threads == None:
        if args.tensor_fn == "PIPE":
            param.NUM_THREADS = 4
    else:
        param.NUM_THREADS = args.threads
    m = cv.Clairvoyante()
    m.init()

    m.restoreParameters(os.path.abspath(args.chkpnt_fn))
    Test(args, m, utils)
def Run(args):
    # create a Clairvoyante
    if args.v2 == True:
        import utils_v2 as utils
        if args.slim == True:
            import clairvoyante_v2_slim as cv
        else:
            import clairvoyante_v2 as cv
    elif args.v3 == True:
        import utils_v2 as utils  # v3 network is using v2 utils
        if args.slim == True:
            import clairvoyante_v3_slim as cv
        else:
            import clairvoyante_v3 as cv
    utils.SetupEnv()
    m = cv.Clairvoyante()
    m.init()

    CalcAll(args, m, utils)
Beispiel #3
0
def Run(args):
    # create a Clairvoyante
    logging.info("Loading model ...")
    if args.v2 == True:
        import utils_v2 as utils
        if args.slim == True:
            import clairvoyante_v2_slim as cv
        else:
            import clairvoyante_v2 as cv
    elif args.v3 == True:
        import utils_v2 as utils  # v3 network is using v2 utils
        if args.slim == True:
            import clairvoyante_v3_slim as cv
        else:
            import clairvoyante_v3 as cv
    utils.SetupEnv()
    m = cv.Clairvoyante()
    m.init()

    m.restoreParameters(os.path.abspath(args.chkpnt_fn))
    Test(args, m, utils)
Beispiel #4
0
def Run(args):
    # create a Clairvoyante
    if args.v2 == True:
        import utils_v2 as utils
        if args.slim == True:
            import clairvoyante_v2_slim as cv
        else:
            import clairvoyante_v2 as cv
    elif args.v3 == True:
        import utils_v2 as utils # v3 network is using v2 utils
        if args.slim == True:
            import clairvoyante_v3_slim as cv
        else:
            import clairvoyante_v3 as cv
    utils.SetupEnv()
    m = cv.Clairvoyante()
    m.init()

    if args.bin_fn != None:
        with open(args.bin_fn, "rb") as fh:
            total = pickle.load(fh)
            XArrayCompressed = pickle.load(fh)
            YArrayCompressed = pickle.load(fh)
            posArrayCompressed = pickle.load(fh)
    else:
        total, XArrayCompressed, YArrayCompressed, posArrayCompressed = \
        utils.GetTrainingArray(args.tensor_fn,
                               args.var_fn,
                               args.bed_fn)

    with open(args.chkpnt_list) as fh:
        for row in fh:
            row = row.rstrip()
            logging.info("Working on model: %s" % (row))
            m.restoreParameters(os.path.abspath(row))
            Test(args, m, utils, total, XArrayCompressed, YArrayCompressed, posArrayCompressed)
def Run(args):
    # create a Clairvoyante
    logging.info("Initializing model ...")
    if args.v2 == True:
        import utils_v2 as utils
        if args.slim == True:
            import clairvoyante_v2_slim as cv
        else:
            import clairvoyante_v2 as cv
    elif args.v3 == True:
        import utils_v2 as utils  # v3 network is using v2 utils
        if args.slim == True:
            import clairvoyante_v3_slim as cv
        else:
            import clairvoyante_v3 as cv
    utils.SetupEnv()
    m = cv.Clairvoyante()
    m.init()

    if args.ochk_prefix == None:
        sys.exit("--chk_prefix must be defined in nonstop training mode")
    if args.chkpnt_fn != None:
        m.restoreParameters(os.path.abspath(args.chkpnt_fn))
    TrainAll(args, m, utils)