pyttb.gcp.fg_setup
Prepare Function and Gradient Handles for GCP OPT.
- pyttb.gcp.fg_setup.setup(objective: Objectives, data: ttb.tensor | ttb.sptensor | None = None, additional_parameter: float | None = None) fg_return [source]
Collect the function and gradient handles for GCP.
- Parameters:
objective – Objective function to gather handles for.
data – Tensor to check for consistency with desired objective function.
additional_parameter – Additional constant argument provided to objective function if necessary.
- Returns:
Function handle, gradient handle, and lower bound.
- pyttb.gcp.fg_setup.valid_nonneg(data: ttb.tensor | ttb.sptensor) bool [source]
Check if provided data is valid non-negative tensor.