cuqi.model.Model.forward#
- Model.forward(*args, is_par=True, **kwargs)#
Forward function of the model.
Forward converts the input to function values (if needed) using the domain geometry of the model. Then it applies the forward operator to the function values and converts the output to parameters using the range geometry of the model.
- Parameters:
*args (ndarrays or cuqi.array.CUQIarray objects or cuqi.samples.Samples objects) –
Positional arguments for the forward operator. The forward operator input can be specified as either positional arguments or keyword arguments but not both.
If the input is specified as positional arguments, the order of the arguments should match the non_default_args of the model.
is_par (bool or a tuple of bools) – If True, the inputs in args or kwargs are assumed to be parameters. If False, the inputs in args or kwargs are assumed to be function values. If is_par is a tuple of bools, the inputs are assumed to be parameters or function values based on the corresponding boolean value in the tuple.
**kwargs (keyword arguments) –
keyword arguments for the forward operator. The forward operator input can be specified as either positional arguments or keyword arguments but not both.
If the input is specified as keyword arguments, the keys should match the non_default_args of the model.
- Returns:
The model output. Always returned as parameters.
- Return type:
ndarray or cuqi.array.CUQIarray or cuqi.samples.Samples object