Beispiel #1
0
import argparse
from datetime import datetime
from importlib import import_module
import json
import os
import sys
from shapeworld import Dataset, util
from models.TFMacros.tf_macros import Model

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Evaluate a model')

    parser.add_argument('-t', '--type', help='Dataset type')
    parser.add_argument('-n',
                        '--name',
                        type=util.parse_tuple(parse_item=str,
                                              unary_tuple=False),
                        default=None,
                        help='Dataset name')
    parser.add_argument('-v',
                        '--variant',
                        type=util.parse_tuple(parse_item=str,
                                              unary_tuple=False),
                        default=None,
                        help='Label of configuration variant')
    parser.add_argument('-l', '--language', default=None, help='Language')
    parser.add_argument('-c',
                        '--config',
                        type=util.parse_tuple(parse_item=str,
                                              unary_tuple=False),
                        default=None,
                        help='Configuration file/directory')
Beispiel #2
0
                        choices=('zip', 'zip:none', 'zip:deflate', 'zip:bzip2',
                                 'zip:lzma', 'tar', 'tar:none', 'tar:gzip',
                                 'tar:bzip2', 'tar:lzma'),
                        help='Store generated data in (compressed) archives')
    parser.add_argument(
        '-U',
        '--unmanaged',
        action='store_true',
        help=
        'Do not automatically create sub-directories (implied if --shards not specified)'
    )

    parser.add_argument('-t', '--type', default=None, help='Dataset type')
    parser.add_argument('-n',
                        '--name',
                        type=util.parse_tuple(parse_item=str,
                                              unary_tuple=False),
                        default=None,
                        help='Dataset name')
    parser.add_argument('-v',
                        '--variant',
                        type=util.parse_tuple(parse_item=str,
                                              unary_tuple=False),
                        default=None,
                        help='Label for configuration variant')
    parser.add_argument('-l', '--language', default=None, help='Language')
    parser.add_argument('-c',
                        '--config',
                        type=util.parse_tuple(parse_item=str,
                                              unary_tuple=False),
                        default=None,
                        help='Configuration file/directory')
Beispiel #3
0
import argparse
from datetime import datetime
from importlib import import_module
import json
import os
import sys
from shapeworld import Dataset, util
from models.TFMacros.tf_macros import Model


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Evaluate a model')

    parser.add_argument('-t', '--type', help='Dataset type')
    parser.add_argument('-n', '--name', type=util.parse_tuple(parse_item=str, unary_tuple=False), default=None, help='Dataset name')
    parser.add_argument('-l', '--language', default=None, help='Dataset language')
    parser.add_argument('-c', '--config', type=util.parse_tuple(parse_item=str, unary_tuple=False), default=None, help='Dataset configuration file')

    parser.add_argument('-m', '--model', help='Model')
    parser.add_argument('-y', '--hyperparams-file', default=None, help='Model hyperparameters file (default: hyperparams directory)')

    parser.add_argument('-b', '--batch-size', type=util.parse_int_with_factor, default=64, help='Batch size')
    parser.add_argument('-i', '--iterations', type=util.parse_int_with_factor, default=100, help='Number of iterations')
    parser.add_argument('-q', '--query', default=None, help='Additional values to query (separated by commas)')
    parser.add_argument('-s', '--serialize', default=None, help='Values to serialize (separated by commas)')

    parser.add_argument('--model-dir', help='TensorFlow model directory, storing the model computation graph and parameters')
    parser.add_argument('--report-file', default=None, help='CSV file reporting the evaluation results')

    parser.add_argument('-v', '--verbosity', type=int, choices=(0, 1, 2), default=1, help='Verbosity (0: no messages, 1: default, 2: plus TensorFlow messages)')