Example #1
0
def main():
    parser = argparse.ArgumentParser(description='BR')
    parser.add_argument('im_size', type=int, help='image size')
    parser.add_argument('dataset', type=str, help='dataset')
    parser.add_argument('c', type=float, help='amount of dropout', default=0.)
    parser.add_argument('lr', type=float, help='learning rate')
    parser.add_argument('opt', type=str, choices=['sgd', 'adam'])
    parser.add_argument('n_hidden',
                        type=int,
                        help='number of neurons in hidden layer')
    parser.add_argument('-im',
                        '--imagenet',
                        action='store_true',
                        help='use imagenet weights')
    parser.add_argument('-pt',
                        '--pretrained',
                        action='store_true',
                        help='Use pretrained VGG features')
    parser.add_argument('-name',
                        type=str,
                        help='name of experiment',
                        default='BR')
    args = parser.parse_args()
    args.name = '_'.join((args.name, args.dataset, str(args.pretrained)))

    timestamp = time.strftime("%Y-%m-%d_%H:%M")
    logger = loggerClass(args, timestamp)
    BR(args, logger, timestamp)
Example #2
0
def main():
    parser = argparse.ArgumentParser(description='OR')
    parser.add_argument('dataset', type=str, help='dataset')
    parser.add_argument('g',
                        type=float,
                        help='monotonicity constraint hyperparam',
                        default=0.1)
    parser.add_argument('q',
                        type=float,
                        help='L2 shrinkage hyperparam',
                        default=0.)
    parser.add_argument('-pt',
                        '--pretrained',
                        action='store_true',
                        help='Use pretrained VGG features')
    parser.add_argument('-name',
                        type=str,
                        help='name of experiment',
                        default='OR_FINAL')

    args = parser.parse_args()
    args.name = '_'.join((args.name, args.dataset))

    timestamp = time.strftime("%Y-%m-%d_%H:%M")
    logger = loggerClass(args, timestamp)
    OR(args, logger)
Example #3
0
def main():
    parser = argparse.ArgumentParser(
        description='Threshold stacking')
    parser.add_argument('dataset', type=str, help='dataset')
    parser.add_argument('-pt', '--pretrained', action='store_true',
                        help='Use marginals predicted on pretrained features')
    parser.add_argument('-name', type=str, help='name of experiment', default='THRESH_stack')
    parser.add_argument('-nl', '--nonlinear', action='store_true', help='use nonlinear model (RF)')

    args = parser.parse_args()
    args.name = ' '.join((args.name, args.dataset))

    timestamp = time.strftime("%Y-%m-%d_%H:%M")
    logger = loggerClass(args, timestamp)
    thresh_stack(args, logger)
Example #4
0
def main():
    parser = argparse.ArgumentParser(description='YE2012')
    parser.add_argument('dataset', type=str, help='dataset')
    parser.add_argument('-pt',
                        '--pretrained',
                        action='store_true',
                        help='Use pretrained VGG features')
    parser.add_argument('-name',
                        type=str,
                        help='name of experiment',
                        default='YE2012')

    args = parser.parse_args()
    args.name = '_'.join((args.name, args.dataset))

    timestamp = time.strftime("%Y-%m-%d_%H:%M")
    logger = loggerClass(args, timestamp)
    ye_et_al(args, logger)
Example #5
0
def main():
    parser = argparse.ArgumentParser(description='thresholding')
    parser.add_argument('dataset', type=str, help='dataset')
    parser.add_argument(
        '-pt',
        '--pretrained',
        action='store_true',
        help='Load marginals from experiments with pretrained features')
    parser.add_argument('-name',
                        type=str,
                        help='name of experiment',
                        default='THRESH')

    args = parser.parse_args()

    args.name = '_'.join((args.name, args.dataset))
    timestamp = time.strftime("%Y-%m-%d_%H:%M")
    logger = loggerClass(args, timestamp)
    thresholding(args, logger)