hyrax.verbs.infer

Attributes

logger

Classes

Infer

Inference verb

Module Contents

logger[source]
class Infer(config)[source]

Bases: hyrax.verbs.verb_registry.Verb

Inference verb

__init__()[source]

Overall initialization for all verbs that saves the config

cli_name = 'infer'[source]
add_parser_kwargs[source]
static setup_parser(parser)[source]

We don’t need any parser setup for CLI opts

run_cli(args=None)[source]

CLI stub for Infer verb

run()[source]

Run inference on a model using a dataset

Parameters:

config (dict) – The parsed config file as a nested dict

static load_model_weights(config, model)[source]

Loads the model weights from a file. Raises RuntimeError if this is not possible due to config, missing or malformed file

Parameters:
  • config (dict) – Full runtime configuration

  • model (nn.Module) – The model class to load weights into