irtk.model.MultiOpt

class irtk.model.MultiOpt(scene: Any, model_classes: List[type])

A model that combines multiple other models.

_models

A list of model instances.

__init__(scene: Any, model_classes: List[type]) None

Initialize the MultiOpt model.

Parameters:
  • scene – The scene object associated with the model.

  • model_classes – A list of model classes to instantiate.

get_regularization() torch.Tensor

Get the combined regularization from all models.

Returns:

A torch tensor containing the combined regularization value.

get_results() List[Any]

Get the results from all models.

Returns:

A list of results from all models.

initialize() None

Initialize all the models.

load_states(state_path: str) None

Load the states for all models.

Parameters:

state_path – The path to load the states from.

save_states(state_path: str) None

Save the states for all models.

Parameters:

state_path – The path to save the states to.

schedule_lr(curr_iter: int) None

Schedule the learning rate for all models.

Parameters:

curr_iter – The current iteration number.

set_data() None

Set the data for all models.

step() None

Perform a step for all models.

write_results(result_path: str) None

Write the results from all models.

Parameters:

result_path – The path to write the results to.

zero_grad() None

Zero out the gradients for all models.