Exemple #1
0
    return args

if __name__ == "__main__":
    #Parse commandline arguments
    args = parse_args()

    #Required params
    input_params = InputParameters(args)
    image_generation_params = ImageGenerationParameters(args)
    num_prediction_steps = args.num_prediction_steps

    dropbox_parameters = args.dropbox_parameters
    log_to_console = args.log_to_console

    #Initialize logging
    logging.initialize(__file__, log_to_console = log_to_console)
    logger = logging.get_logger(__name__)

    #Log input parameters
    logger.info('Running with parameters input_params: %s', input_params)
    logger.info('Additional parameters: image_generation_params: %s log_to_console: %s', image_generation_params, log_to_console)

    #Predictable randomness
    seed = 3
    np_seed(seed)
    tf_seed(seed)

    #Dropbox
    dropbox = None

    if dropbox_parameters:
Exemple #2
0
    def __init__(self, *args, **kwargs):
        super(TestDropboxConnection, self).__init__(*args, **kwargs)

        #Initialize logging
        logging.initialize('unittest')
    def __init__(self, methodName = 'runTest'):
        super(TestImageDataTransformation, self).__init__(methodName)

        #Logging
        logging.initialize(ut_constants.LOGGING_CLASS)
        self._logger = logging.get_logger(__name__)
Exemple #4
0
    args = parse_args()

    dataset_location = args.dataset_location
    output_dataset_location = args.output_dataset_location
    input_file = args.input_file
    output_file = args.output_file
    num_inputs = args.num_inputs
    image_col = args.image_col
    target_shape = tuple(args.target_shape)
    dropbox_parameters = args.dropbox_parameters
    parallel = args.parallel
    log_to_console = args.log_to_console

    #Initialize logging
    logging.initialize(__file__,
                       log_to_console=log_to_console,
                       no_logging=parallel)
    logger = logging.get_logger(__name__)

    #Log input parameters
    logger.info(
        'Parameters:: dataset_location: %s output_dataset_location: %s',
        dataset_location, output_dataset_location)
    logger.info('Parameters:: input_file: %s output_file: %s', input_file,
                output_file)
    logger.info('Parameters:: image_col: %s target_shape: %s', image_col,
                target_shape)
    logger.info('Parameters:: num_inputs: %s parallel: %s log_to_console: %s',
                num_inputs, parallel, log_to_console)

    ####################################### Validation [Start] ############################################