Skip to content

Utils

parse_args

def parse_args()

Parse CLI arguments.

get_timestamp

def get_timestamp()

check_parameter_keys

def check_parameter_keys(parameter, needed_keys, optional_keys, default_value)

get_config_from_weights

def get_config_from_weights(w_path, arch_params, name)

Extracts architecture parameters from the file name of the weights. Only works with standardized weights name.

select_option

def select_option(options, message, val)

CLI selection given options.

select_multiple_options

def select_multiple_options(options, message, val)

CLI multiple selection given options.

select_bool

def select_bool(message)

CLI bool selection.

select_positive_float

def select_positive_float(message)

CLI non-negative float selection.

select_positive_integer

def select_positive_integer(message, value)

CLI non-negative integer selection.

browse_weights

def browse_weights(weights_dir, model)

Weights selection from cl.

setup

def setup(config_file, default, training, prediction)

CLI interface to set up the training or prediction session.

Takes as input the configuration file path (minus the '.py' extension) and arguments parse from CLI.

suggest_metrics

def suggest_metrics(discriminator, feature_extractor, loss_weights)

select_dataset

def select_dataset(session_type, conf)

CLI snippet for selection the dataset for training.