Esempio n. 1
0
def tfreloader(bs, cls, ct):
    filename = data_dir + '/test.tfrecords'
    datasets = data_input.DataSet(bs,
                                  ct,
                                  ep=1,
                                  cls=cls,
                                  mode='test',
                                  filename=filename)

    return datasets
Esempio n. 2
0
def tfreloader(mode, ep, bs, cls, ctr, cte, cva):
    filename = data_dir + '/' + mode + '.tfrecords'
    if mode == 'train':
        ct = ctr
    elif mode == 'test':
        ct = cte
    else:
        ct = cva

    datasets = data_input3.DataSet(bs, ct, ep=ep, cls=cls, mode=mode, filename=filename)

    return datasets
Esempio n. 3
0
            tes = test_tiles
        tecc = len(tes['label'])
        if not os.path.isfile(data_dir + '/test.tfrecords'):
            loaders.loaderX(data_dir, 'test')
        m = cnn5.INCEPTION(INPUT_DIM,
                           HYPERPARAMS,
                           meta_graph=opt.modeltoload,
                           log_dir=LOG_DIR,
                           meta_dir=METAGRAPH_DIR,
                           model=opt.mode)
        print("Loaded! Ready for test!")
        if tecc >= bs:
            datasets = data_input_fusion.DataSet(bs,
                                                 tecc,
                                                 ep=1,
                                                 cls=2,
                                                 mode='test',
                                                 filename=data_dir +
                                                 '/test.tfrecords')
            m.inference(datasets, opt.dirr, testset=tes, pmd=opt.pdmd)
        else:
            print("Not enough testing images!")

    else:
        bs = 64
        # input image dimension
        INPUT_DIM = [bs, 299, 299, 3]
        # hyper parameters
        HYPERPARAMS = {
            "batch_size": bs,
            "dropout": 0.3,