Module Expr Str Import alias Import alias ImportFrom alias Import alias identifier Import alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore SubscriptLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Slice NameLoad Return Call NameLoad GeneratorExp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad Call NameLoad NameLoad attr CompareIn NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str keyword Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Num keyword Num keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str Str keyword IfExp CompareGtE Call NameLoad Num Str Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore NameLoad TryExcept body Assign NameStore Call NameLoad Num BinOpSub Num BinOpMult AttributeLoad NameLoad attr Num handlers ExceptHandler type TupleLoad NameLoad NameLoad body Assign NameStore Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad For NameStore ListLoad Str Str Str Str Str body If Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword Str keyword Num keyword Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd Str SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr UnaryOpNot AttributeLoad NameLoad attr If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareGt AttributeLoad NameLoad attr Num body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign NameStore BinOpMod Str NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad If BoolOpAnd CompareGt AttributeLoad NameLoad attr Num CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str If NameLoad body Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr keyword Num Return NameLoad decorator_list decorator_list
N/A N/A 
Command line argument parser for neon deep learning library

This is a wrapper around the configargparse ArgumentParser class.
It adds in the default neon command line arguments and allows
additional arguments to be added using the argparse library
methods.  Lower priority defaults can also be read from a configuration file
(specified by the -c command line argument).
 N/A configargparse N/A logging logging.handlers RotatingFileHandler N/A numpy np N/A os N/A inspect neon __version__ neon_version neon.backends gen_backend neon.backends.util.check_gpu get_compute_capability get_device_count neon.callbacks.callbacks Callbacks N/A logger N/A N/A logging getLogger __name__ extract_valid_args N/A N/A args func startidx N/A 0 N/A N/A 
    Given a namespace of argparser args, extract those applicable to func.

    Arguments:
        args (Namespace): a namespace of args from argparse
        func (Function): a function to inspect, to determine valid args

    Returns:
        dict of (arg, value) pairs from args that are valid for func
     N/A func_args N/A N/A N/A N/A inspect getargspec func args N/A startidx N/A N/A dict N/A N/A k v N/A N/A k v N/A N/A N/A vars args items N/A k func_args N/A NeonArgparser N/A N/A configargparse ArgumentParser N/A N/A 
    Setup the command line arg parser and parse the
    arguments in sys.arg (or from configuration file).  Use the parsed
    options to configure the logging module.

    Arguments:
        desc (String) : Docstring from the calling function.
        This will be used for the description of the command receiving the arguments.
     __init__ N/A N/A self N/A args kwargs N/A N/A N/A self _PARSED False N/A N/A self work_dir N/A N/A N/A os path join N/A N/A N/A os path expanduser ~ nervana N/A N/A default_config_files kwargs N/A N/A N/A kwargs N/A default_config_files N/A N/A N/A N/A os path join N/A self work_dir neon.cfg N/A N/A add_config_file_help kwargs N/A N/A N/A kwargs N/A add_config_file_help False N/A N/A N/A N/A super NeonArgparser self __init__ args kwargs N/A N/A self formatter_class N/A configargparse ArgumentDefaultsHelpFormatter N/A N/A N/A self setup_default_args N/A setup_default_args N/A N/A self N/A N/A N/A 
        Setup the default arguments used by neon
         N/A N/A N/A self add_argument --version action version version neon_version N/A N/A N/A self add_argument -c --config is_config_file True help Read values for these arguments from the configuration file specified here first. N/A N/A N/A self add_argument -v --verbose action count default 1 help verbosity level.  Add multiple v's to further increase verbosity N/A N/A N/A self add_argument --no_progress_bar action store_true help suppress running display of progress bar and training loss N/A rt_grp N/A N/A self add_argument_group runtime N/A N/A N/A rt_grp add_argument -w --data_dir default N/A N/A N/A os path join N/A self work_dir data help working directory in which to cache downloaded and preprocessed datasets N/A N/A N/A rt_grp add_argument -e --epochs type int default 10 help number of complete passes over the dataset to run N/A N/A N/A rt_grp add_argument -s --save_path type str help file path to save model snapshots N/A N/A N/A rt_grp add_argument --serialize nargs ? type int default 0 const 1 metavar N help serialize model every N epochs N/A N/A N/A rt_grp add_argument --model_file help load model from pkl file N/A N/A N/A rt_grp add_argument -l --log dest logfile nargs ? const N/A N/A N/A os path join N/A self work_dir neon_log.txt help log file N/A N/A N/A rt_grp add_argument -o --output_file default None help hdf5 data file for metrics computed during the run, optional.  Can be used by nvis for visualization. N/A N/A N/A rt_grp add_argument -eval --eval_freq type int default None help frequency (in epochs) to test the eval set. N/A N/A N/A rt_grp add_argument -H --history type int default 1 help number of checkpoint files to retain N/A be_grp N/A N/A self add_argument_group backend N/A N/A N/A be_grp add_argument -b --backend choices N/A cpu gpu mgpu argon default N/A N/A N/A get_compute_capability 3.0 gpu cpu help backend type. Multi-GPU support is a premium feature available exclusively through the Nervana cloud. Please contact info@nervanasys.com for details. N/A N/A N/A be_grp add_argument -i --device_id type int default 0 help gpu device id (only used with GPU backend) N/A N/A N/A be_grp add_argument -m --max_devices type int default N/A get_device_count help max number of GPUs (only used with mgpu backend N/A N/A N/A be_grp add_argument -r --rng_seed type int default None metavar SEED help random number generator seed N/A N/A N/A be_grp add_argument -u --rounding const True type int nargs ? metavar BITS default False help use stochastic rounding [will round to BITS number of bits if specified] N/A N/A N/A be_grp add_argument -d --datatype choices N/A f16 f32 f64 default f32 metavar default datatype help default floating point precision for backend [f64 for cpu only] N/A N/A N/A be_grp add_argument -z --batch_size type int default 128 help batch size N/A N/A N/A be_grp add_argument --caffe action store_true help match caffe when computing conv and pool layer output sizes and dropout implementation N/A N/A N/A be_grp add_argument --deterministic action store_true help Use deterministic kernels where applicable N/A N/A add_yaml_arg N/A N/A self N/A N/A N/A 
        Add the yaml file argument, this is needed for scripts that
        parse the model config from yaml files

         N/A N/A N/A self add_argument yaml_file type N/A N/A configargparse FileType r help neon model specification file N/A add_argument N/A N/A self N/A args kwargs N/A N/A 
        Method by which command line arguments are added to the parser.  Passed
        straight through to parent add_argument method.
         N/A N/A self _PARSED N/A N/A N/A N/A logger warn Adding arguments after arguments were parsed = may need to rerun parse_args N/A N/A self _PARSED False N/A N/A N/A N/A super NeonArgparser self add_argument args kwargs N/A N/A add N/A N/A self N/A N/A N/A N/A add_arg N/A N/A self N/A N/A N/A N/A parse_args N/A N/A self gen_be N/A True N/A N/A 
        Parse the command line arguments and setup neon
        runtime environment accordingly

        Arguments:
            gen_be (bool): if False, the arg parser will not
                           generate the backend

        Returns:
            namespace: contains the parsed arguments as attributes
         N/A args N/A N/A N/A super NeonArgparser self parse_args N/A err_msg None N/A N/A N/A log_thresh N/A max 10 N/A 40 N/A N/A args verbose 10 N/A N/A N/A N/A AttributeError TypeError N/A N/A log_thresh 30 N/A N/A args log_thresh log_thresh N/A fmtr N/A N/A logging Formatter %(asctime)s - %(name)s - %(levelname)s - %(message)s N/A main_logger N/A N/A logging getLogger neon N/A N/A N/A main_logger setLevel log_thresh N/A stderrlog N/A N/A logging StreamHandler N/A N/A N/A stderrlog setFormatter fmtr N/A path N/A data_dir save_path model_file output_file logfile N/A N/A N/A getattr args path N/A N/A N/A setattr args path N/A N/A N/A os path expanduser N/A getattr args path N/A N/A args logfile N/A N/A filelog N/A RotatingFileHandler filename N/A args logfile mode w maxBytes 10000000 backupCount 5 N/A N/A N/A filelog setFormatter fmtr N/A N/A N/A filelog setLevel log_thresh N/A N/A N/A main_logger addHandler filelog N/A N/A args no_progress_bar N/A N/A N/A N/A stderrlog setLevel log_thresh N/A N/A N/A N/A stderrlog setLevel N/A logging ERROR N/A N/A N/A N/A stderrlog setLevel log_thresh N/A N/A main_logger propagate False N/A N/A N/A main_logger addHandler stderrlog N/A N/A args datatype N/A float N/A N/A args datatype N/A 1 N/A N/A args datatype N/A N/A N/A np dtype N/A args datatype type N/A N/A args progress_bar N/A N/A args no_progress_bar N/A N/A N/A N/A args backend cpu N/A N/A args rounding 0 N/A N/A err_msg CPU backend does not support stochastic rounding N/A N/A N/A logger exception err_msg N/A N/A NotImplementedError err_msg N/A N/A args save_path N/A N/A savedir N/A N/A N/A os path dirname N/A N/A N/A os path abspath N/A args save_path N/A N/A N/A N/A os access savedir N/A N/A os R_OK N/A os W_OK N/A N/A N/A N/A N/A N/A os makedirs savedir N/A N/A N/A OSError N/A N/A err_msg N/A Can not create save_path %s savedir N/A N/A N/A N/A os path exists N/A args save_path N/A N/A N/A N/A logger warning N/A save file %s exists, attempting to overwrite N/A args save_path N/A N/A N/A N/A os access N/A args save_path N/A N/A os R_OK N/A os W_OK N/A N/A err_msg N/A Can not write to save_path file %s N/A args save_path N/A err_msg N/A N/A N/A N/A logger exception err_msg N/A N/A IOError err_msg N/A N/A N/A N/A args serialize 0 N/A N/A args save_path None N/A N/A N/A args save_path neon_model.pkl N/A N/A N/A logger warn No path given for model serialization, using default "%s" N/A args save_path N/A N/A N/A N/A args save_path None N/A N/A args serialize 0 N/A N/A N/A args serialize 1 N/A N/A N/A logger warn No schedule given for model serialization, using default %d N/A args serialize N/A N/A args model_file N/A N/A err_msg None N/A N/A N/A N/A N/A os path exists N/A args model_file N/A N/A err_msg N/A Model file %s not present N/A args model_file N/A N/A N/A N/A os access N/A args model_file N/A os R_OK N/A N/A err_msg N/A No read access for model file %s N/A args model_file N/A err_msg N/A N/A N/A N/A logger exception err_msg N/A N/A IOError err_msg N/A N/A args caffe N/A N/A N/A args compat_mode caffe N/A N/A N/A args compat_mode None N/A N/A args deterministic N/A N/A N/A N/A logger warn --deterministic flag is deprecated.  Specify random seed for deterministic behavior. N/A gen_be N/A N/A N/A gen_backend backend N/A args backend rng_seed N/A args rng_seed device_id N/A args device_id batch_size N/A args batch_size datatype N/A args datatype max_devices N/A args max_devices compat_mode N/A args compat_mode N/A N/A N/A logger info N/A N/A self format_values N/A N/A self _PARSED True N/A N/A self args args N/A N/A args callback_args N/A extract_valid_args args N/A Callbacks __init__ startidx 1 N/A args N/A N/A