API Reference
InferOpt
— ModuleInferOpt
A toolbox for using combinatorial optimization algorithms within machine learning pipelines.
See our preprint https://arxiv.org/abs/2207.13513
Types
InferOpt.AbstractLayer
— TypeAbstractLayer
Supertype for all the layers defined in InferOpt.
All of these layers are callable, and differentiable with any ChainRules-compatible autodiff backend.
Interface
(layer::AbstractLayer)(args...; kwargs...)
InferOpt.AbstractLossLayer
— TypeAbstractLossLayer <: AbstractLayer
Supertype for all the loss layers defined in InferOpt.
Depending on the precise loss, the arguments to the layer might vary
Interface
(layer::AbstractLossLayer)(θ; kwargs...)
or(layer::AbstractLossLayer)(θ, θ_true; kwargs...)
or(layer::AbstractLossLayer)(θ, y_true; kwargs...)
or(layer::AbstractLossLayer)(θ, (; θ_true, y_true); kwargs...)
InferOpt.AbstractOptimizationLayer
— TypeAbstractOptimizationLayer <: AbstractLayer
Supertype for all the optimization layers defined in InferOpt.
Interface
(layer::AbstractOptimizationLayer)(θ; kwargs...)
compute_probability_distribution(layer, θ; kwargs...)
(only if the layer is probabilistic)
InferOpt.AbstractPerturbed
— TypeAbstractPerturbed{F,parallel} <: AbstractOptimizationLayer
Differentiable perturbation of a black box optimizer of type F
.
The parameter parallel
is a boolean value indicating if the perturbations are run in parallel. This is particularly useful if your black box optimizer running time is high.
Available implementations:
These three subtypes share the following fields:
oracle
: black box (optimizer)perturbation::P
: perturbation distribution of the input θgrad_logdensity::G
: gradient of the log densityperturbation
w.r.t. input θnb_samples::Int
: number of perturbation samples drawn at each forward passseed::Union{Nothing,Int}
: seed of the perturbation. It is reset each time the forward pass is called, making it deterministic by always drawing the same perturbations. If you do not want this behaviour, set this field tonothing
.rng::AbstractRNG
: random number generator using theseed
.
The perturbation
field does not mean the same thing for a PerturbedOracle
than for a PerturbedAdditive
/PerturbedMultiplicative
. See their respective docs.
InferOpt.AbstractPerturbed
— Method(perturbed::AbstractPerturbed)(θ; kwargs...)
Forward pass. Compute the expectation of the underlying distribution.
InferOpt.AbstractRegularized
— TypeAbstractRegularized <: AbstractOptimizationLayer
Convex regularization perturbation of a black box linear optimizer
ŷ(θ) = argmax_{y ∈ C} {θᵀy - Ω(y)}
Interface
(regularized::AbstractRegularized)(θ; kwargs...)
: returnŷ(θ)
compute_regularization(regularized, y)
: returnΩ(y)
Available implementations
InferOpt.AbstractRegularizedGeneralizedMaximizer
— TypeAbstractRegularizedGeneralizedMaximizer <: AbstractRegularized
Convex regularization perturbation of a black box generalized optimizer
ŷ(θ) = argmax_{y ∈ C} {θᵀg(y) + h(y) - Ω(y)}
with g and h functions of y.
Interface
(regularized::AbstractRegularized)(θ; kwargs...)
: returnŷ(θ)
compute_regularization(regularized, y)
: returnΩ(y)
get_maximizer(regularized)
: return the associatedGeneralizedMaximizer
optimizer
InferOpt.FenchelYoungLoss
— TypeFenchelYoungLoss <: AbstractLossLayer
Fenchel-Young loss associated with a given optimization layer.
L(θ, y_true) = (Ω(y_true) - θᵀy_true) - (Ω(ŷ) - θᵀŷ)
Reference: https://arxiv.org/abs/1901.02324
Fields
optimization_layer::AbstractOptimizationLayer
: optimization layer that can be formulated asŷ(θ) = argmax {θᵀy - Ω(y)}
(either regularized or perturbed)
InferOpt.FenchelYoungLoss
— Method(fyl::FenchelYoungLoss)(θ, y_true[; kwargs...])
InferOpt.FixedAtomsProbabilityDistribution
— TypeFixedAtomsProbabilityDistribution{A,W}
Encodes a probability distribution with finite support and fixed atoms.
See compute_expectation
to understand the name of this struct.
Fields
atoms::Vector{A}
: elements of the supportweights::Vector{W}
: probability values for each atom (must sum to 1)
InferOpt.GeneralizedMaximizer
— TypeGeneralizedMaximizer{F,G,H}
Wrapper for generalized maximizers maximizer
of the form argmax_y θᵀg(y) + h(y). It is compatible with the following layers
PerturbedAdditive
(with or withoutFenchelYoungLoss
)PerturbedMultiplicative
(with or withoutFenchelYoungLoss
)SPOPlusLoss
InferOpt.IdentityRelaxation
— TypeIdentityRelaxation <: AbstractOptimizationLayer
Naive relaxation of a black-box optimizer where constraints are simply forgotten.
Consider (centering and) normalizing θ
before applying it.
Fields
maximizer
: underlying argmax function
Reference: https://arxiv.org/abs/2205.15213
InferOpt.ImitationLoss
— TypeImitationLoss <: AbstractLossLayer
Generic imitation loss of the form
L(θ, t_true) = max_y {δ(y, t_true) + α θᵀ(y - y_true) - (Ω(y) - Ω(y_true))}
- When
δ
is zero, this is equivalent to aFenchelYoungLoss
. - When
Ω
is zero, this is equivalent to aStructuredSVMLoss
.
Note: by default, t_true
is a named tuple with field y_true
, but it can be any data structure for which the get_y_true
method is implemented.
Fields
aux_loss_maximizer
: function of(θ, t_true, α)
that computes the argmax in the problem aboveδ
: base loss functionΩ
: regularization functionα::Float64
: hyperparameter with a default value of 1.0
InferOpt.ImitationLoss
— Method(il::ImitationLoss)(θ, t_true; kwargs...)
InferOpt.ImitationLoss
— MethodImitationLoss(; aux_loss_maximizer, δ, Ω, α=1.0)
Explicit constructor with keyword arguments.
InferOpt.Interpolation
— TypeInterpolation <: AbstractOptimizationLayer
Piecewise-linear interpolation of a black-box optimizer.
Fields
maximizer
: underlying argmax functionλ::Float64
: smoothing parameter (smaller = more faithful approximation, larger = more informative gradients)
Reference: https://arxiv.org/abs/1912.02175
InferOpt.PerturbedAdditive
— TypePerturbedAdditive{P,G,O,R,S,parallel} <: AbstractPerturbed{parallel}
Differentiable normal perturbation of a black-box maximizer: the input undergoes θ -> θ + εZ
where Z ∼ N(0, I)
.
This AbstractOptimizationLayer
is compatible with FenchelYoungLoss
, if the oracle is an optimization maximizer with a linear objective.
Reference: https://arxiv.org/abs/2002.08676
See AbstractPerturbed
for more details.
Specific field
ε:Float64
: size of the perturbation
InferOpt.PerturbedAdditive
— MethodPerturbedAdditive(oracle[; ε, nb_samples, seed, is_parallel, perturbation, grad_logdensity, rng])
PerturbedAdditive
constructor.
Arguments
oracle
: the black-box oracle we want to differentiate through. It should be a linear maximizer if you want to use it inside aFenchelYoungLoss
.
Keyword arguments (optional)
ε=1.0
: size of the perturbation.nb_samples::Int=1
: number of perturbation samples drawn at each forward pass.perturbation=nothing
: nothing by default. If you want to use a different distribution than aNormal
for the perturbationz
, give it here as a distribution-like object implementing therand
method. It should also implementlogdensityof
ifgrad_logdensity
is not given.grad_logdensity=nothing
: gradient function ofperturbation
w.r.t.θ
. If set to nothing (default), it's computed using automatic differentiation.seed::Union{Nothing,Int}=nothing
: seed of the perturbation. It is reset each time the forward pass is called, making it deterministic by always drawing the same perturbations. If you do not want this behaviour, set this field tonothing
.rng::AbstractRNG
=MersenneTwister(0): random number generator using theseed
.
InferOpt.PerturbedMultiplicative
— TypePerturbedMultiplicative{P,G,O,R,S,parallel} <: AbstractPerturbed{parallel}
Differentiable multiplicative perturbation of a black-box oracle: the input undergoes θ -> θ ⊙ exp[εZ - ε²/2]
where Z ∼ perturbation
.
This AbstractOptimizationLayer
is compatible with FenchelYoungLoss
, if the oracle is an optimization maximizer with a linear objective.
Reference: https://arxiv.org/abs/2207.13513
See AbstractPerturbed
for more details.
Specific field
ε:Float64
: size of the perturbation
InferOpt.PerturbedMultiplicative
— MethodPerturbedMultiplicative(oracle[; ε, nb_samples, seed, is_parallel, perturbation, grad_logdensity, rng])
PerturbedMultiplicative
constructor.
Arguments
oracle
: the black-box oracle we want to differentiate through. It should be a linear maximizer if you want to use it inside a [FenchelYoungLoss
].
Keyword arguments (optional)
ε=1.0
: size of the perturbation.nb_samples::Int=1
: number of perturbation samples drawn at each forward pass.perturbation=nothing
: nothing by default. If you want to use a different distribution than aNormal
for the perturbationz
, give it here as a distribution-like object implementing therand
method. It should also implementlogdensityof
ifgrad_logdensity
is not given.grad_logdensity=nothing
: gradient function ofperturbation
w.r.t.θ
. If set to nothing (default), it's computed using automatic differentiation.seed::Union{Nothing,Int}=nothing
: seed of the perturbation. It is reset each time the forward pass is called, making it deterministic by always drawing the same perturbations. If you do not want this behaviour, set this field tonothing
.rng::AbstractRNG
=MersenneTwister(0): random number generator using theseed
.
InferOpt.PerturbedOracle
— TypePerturbedOracle{P,G,O,R,S,parallel} <: AbstractPerturbed{parallel}
Differentiable perturbed black-box oracle. The oracle
input θ
is perturbed as η ∼ perturbation(⋅|θ)
. PerturbedAdditive
is a special case of PerturbedOracle
with perturbation(θ) = MvNormal(θ, ε * I)
. [PerturbedMultiplicative
] is also a special case of PerturbedOracle
.
See AbstractPerturbed
for more details about its fields.
InferOpt.PerturbedOracle
— MethodPerturbedOracle(perturbation, oracle[; grad_logdensity, rng, seed, is_parallel, nb_samples])
PerturbedOracle
constructor.
Arguments
oracle
: the black-box oracle we want to differentiate throughperturbation
: should be a callable such thatperturbation(θ)
is a distribution-like object that can be sampled withrand
. It should also implementlogdensityof
ifgrad_logdensity
is not given.
Keyword arguments (optional)
grad_logdensity=nothing
: gradient function ofperturbation
w.r.t.θ
. If set to nothing (default), it's computed using automatic differentiation.nb_samples::Int=1
: number of perturbation samples drawn at each forward passseed::Union{Nothing,Int}=nothing
: seed of the perturbation. It is reset each time the forward pass is called, making it deterministic by always drawing the same perturbations. If you do not want this behaviour, set this field tonothing
.rng::AbstractRNG
=MersenneTwister(0): random number generator using theseed
.
If you have access to the analytical expression of grad_logdensity
it is recommended to give it, as it will be computationally faster.
InferOpt.Pushforward
— TypePushforward <: AbstractLayer
Differentiable pushforward of a probabilistic optimization layer with an arbitrary function post-processing function.
Pushforward
can be used for direct regret minimization (aka learning by experience) when the post-processing returns a cost.
Fields
optimization_layer::AbstractOptimizationLayer
: probabilistic optimization layerpost_processing
: callable
See also: FixedAtomsProbabilityDistribution
.
InferOpt.Pushforward
— Method(pushforward::Pushforward)(θ; kwargs...)
Output the expectation of pushforward.post_processing(X)
, where X
follows the distribution defined by pushforward.optimization_layer
applied to θ
.
Unlike compute_probability_distribution(pushforward, θ)
, this function is differentiable, even if pushforward.post_processing
isn't.
See also: compute_expectation
.
InferOpt.RegularizedFrankWolfe
— TypeRegularizedFrankWolfe <: AbstractRegularized
Regularized optimization layer which relies on the Frank-Wolfe algorithm to define a probability distribution while solving
ŷ(θ) = argmax_{y ∈ C} {θᵀy - Ω(y)}
Since this is a conditional dependency, you need to have loaded the package DifferentiableFrankWolfe.jl before using RegularizedFrankWolfe
.
Fields
linear_maximizer
: linear maximization oracleθ -> argmax_{x ∈ C} θᵀx
, implicitly defines the polytopeC
Ω
: regularization functionΩ(y)
Ω_grad
: gradient function of the regularization function∇Ω(y)
frank_wolfe_kwargs
: named tuple of keyword arguments passed to the Frank-Wolfe algorithm
Frank-Wolfe parameters
Some values you can tune:
epsilon::Float64
: precision targetmax_iteration::Integer
: max number of iterationstimeout::Float64
: max runtime in secondslazy::Bool
: caching strategyaway_steps::Bool
: avoid zig-zaggingline_search::FrankWolfe.LineSearchMethod
: step size selectionverbose::Bool
: console output
See the documentation of FrankWolfe.jl for details.
InferOpt.RegularizedFrankWolfe
— Method(regularized::RegularizedFrankWolfe)(θ; kwargs...)
Apply compute_probability_distribution(regularized, θ; kwargs...)
and return the expectation.
InferOpt.RegularizedFrankWolfe
— MethodRegularizedFrankWolfe(linear_maximizer; Ω, Ω_grad, frank_wolfe_kwargs=(;))
InferOpt.SPOPlusLoss
— TypeSPOPlusLoss <: AbstractLossLayer
Convex surrogate of the Smart "Predict-then-Optimize" loss.
Fields
maximizer
: linear maximizer function of the formθ -> ŷ(θ) = argmax θᵀy
α::Float64
: convexification parameter, default = 2.0
Reference: https://arxiv.org/abs/1710.08005
InferOpt.SPOPlusLoss
— Method(spol::SPOPlusLoss)(θ, θ_true, y_true; kwargs...)
InferOpt.SPOPlusLoss
— Method(spol::SPOPlusLoss)(θ, θ_true; kwargs...)
InferOpt.SPOPlusLoss
— MethodSPOPlusLoss(maximizer; α=2.0)
InferOpt.SoftArgmax
— TypeSoftArgmax <: Regularized
Soft argmax activation function s(z) = (e^zᵢ / ∑ e^zⱼ)ᵢ
.
Corresponds to regularized prediction on the probability simplex with entropic penalty.
InferOpt.SoftRank
— TypeSoftRank{is_l2_regularized} <: AbstractRegularized
Fast differentiable ranking regularized layer. It uses an L2 regularization if is_l2_regularized
is true, else it uses an entropic (kl) regularization.
As an AbstractRegularized
layer, it can also be used for supervised learning with a FenchelYoungLoss
.
Fields
ε::Float64
: size of the regularizationrev::Bool
: rank in ascending order if false
Reference: https://arxiv.org/abs/2002.08871
InferOpt.SoftRank
— MethodSoftRank(; ε::Float64=1.0, rev::Bool=false, is_l2_regularized::Bool=true)
Constructor for SoftRank
.
Arguments
ε::Float64=1.0
: size of the regularizationrev::Bool=false
: rank in ascending order if false- `regularization="l2": used regularization, either "l2" or "kl"
InferOpt.SoftSort
— TypeSoftSort{is_l2_regularized} <: AbstractOptimizationLayer
Fast differentiable sorting optimization layer. It uses an L2 regularization if is_l2_regularized
is true, else it uses an entropic (kl) regularization.
Reference https://arxiv.org/abs/2002.08871
Fields
ε::Float64
: size of the regularizationrev::Bool
: sort in ascending order if false
InferOpt.SoftSort
— MethodSoftSort(; ε::Float64=1.0, rev::Bool=false, is_l2_regularized::Bool=true)
Constructor for SoftSort
.
Arguments
ε::Float64=1.0
: size of the regularizationrev::Bool=false
: sort in ascending order if falseis_l2_regularized::Bool=true
: use l2 regularization if true, else kl regularization
InferOpt.SparseArgmax
— TypeSparseArgmax <: AbstractRegularized
Compute the Euclidean projection of the vector z
onto the probability simplex.
Corresponds to regularized prediction on the probability simplex with square norm penalty.
InferOpt.StructuredSVMLoss
— TypeStructuredSVMLoss <: AbstractLossLayer
Loss associated with the Structured Support Vector Machine, defined by
L(θ, y_true) = max_y {δ(y, y_true) + α θᵀ(y - y_true)}
Reference: http://www.nowozin.net/sebastian/papers/nowozin2011structured-tutorial.pdf (Chapter 6)
Fields
aux_loss_maximizer::M
: function of(θ, y_true, α)
that computes the argmax in the problem aboveδ::L
: base loss functionα::Float64
: hyperparameter with a default value of 1.0
InferOpt.StructuredSVMLoss
— Method(ssvml::StructuredSVMLoss)(θ, y_true; kwargs...)
InferOpt.StructuredSVMLoss
— MethodStructuredSVMLoss(; aux_loss_maximizer, δ, α=1.0)
Functions
Base.rand
— Methodrand([rng,] probadist)
Sample from the atoms of probadist
according to their weights.
InferOpt.ZeroOneImitationLoss
— FunctionZeroOneStructuredSVMLoss(α)
Implementation of the ImitationLoss
based on a 0-1 loss for multiclass classification with no regularization.
InferOpt.ZeroOneStructuredSVMLoss
— FunctionZeroOneStructuredSVMLoss
Implementation of the StructuredSVMLoss
based on a 0-1 loss for multiclass classification.
InferOpt.apply_on_atoms
— Methodapply_on_atoms(post_processing, probadist)
Create a new distribution by applying the function post_processing
to each atom of probadist
(the weights remain the same).
InferOpt.compute_expectation
— Functioncompute_expectation(probadist[, post_processing=identity])
Compute the expectation of post_processing(X)
where X
is a random variable distributed according to probadist
.
This operation is made differentiable thanks to a custom reverse rule, even when post_processing
itself is not a differentiable function.
Derivatives are computed with respect to probadist.weights
only, assuming that probadist.atoms
doesn't change (hence the name FixedAtomsProbabilityDistribution
).
InferOpt.compute_probability_distribution
— Functioncompute_probability_distribution(layer, θ; kwargs...)
Apply a probabilistic optimization layer to an objective direction θ
in order to generate a FixedAtomsProbabilityDistribution
on the vertices of a polytope.
InferOpt.compute_probability_distribution
— Methodcompute_probability_distribution(perturbed::AbstractPerturbed, θ; kwargs...)
Turn random perturbations of θ
into a distribution on polytope vertices.
Keyword arguments are passed to the underlying linear maximizer.
InferOpt.compute_probability_distribution
— Methodcompute_probability_distribution(pushforward, θ)
Output the distribution of pushforward.post_processing(X)
, where X
follows the distribution defined by pushforward.optimization_layer
applied to θ
.
This function is not differentiable if pushforward.post_processing
isn't.
See also: apply_on_atoms
.
InferOpt.compute_probability_distribution_from_samples
— Functioncompute_probability_distribution_from_samples(
::AbstractPerturbed,
θ::AbstractArray,
samples::Vector{<:AbstractArray};
kwargs...,
)
Create a probability distributions from samples
drawn from perturbation
.
InferOpt.compute_regularization
— Functioncompute_regularization(regularized, y)
Return the convex penalty Ω(y)
associated with an AbstractRegularized
layer.
InferOpt.get_maximizer
— Functionget_maximizer(regularized)
Return the associated optimizer.
InferOpt.get_y_true
— Functionget_y_true(t_true::Any)
Retrieve y_true
from t_true
.
This method should be implemented when using a custom data structure for t_true
other than a NamedTuple
.
InferOpt.get_y_true
— Methodget_y_true(t_true::NamedTuple)
Retrieve y_true
from t_true
. t_true
must contain an y_true
field.
InferOpt.half_square_norm
— Methodhalf_square_norm(x)
Compute the squared Euclidean norm of x
and divide it by 2.
InferOpt.isproba
— Methodisproba(x)
Check whether x ∈ [0,1]
.
InferOpt.isprobadist
— Methodisprobadist(p)
Check whether the elements of p
are nonnegative and sum to 1.
InferOpt.objective_value
— Methodobjective_value(f, θ, y, kwargs...)
Computes the objective value of given GeneralizedMaximizer f
, knowing weights θ
and solution y
.
InferOpt.one_hot_argmax
— Methodone_hot_argmax(z)
One-hot encoding of the argmax function.
InferOpt.perturbation_grad_logdensity
— Functionperturbation_grad_logdensity(
::RuleConfig,
::AbstractPerturbed,
θ::AbstractArray,
sample::AbstractArray,
)
Compute de gradient w.r.t to the input θ
of the logdensity of the perturbed input distribution evaluated in the observed perturbation sample η
.
InferOpt.positive_part
— Methodpositive_part(x)
Compute max(x,0)
.
InferOpt.ranking
— Methodranking(θ[; rev])
Compute the vector r
such that rᵢ
is the rank of θᵢ
in θ
.
InferOpt.sample_perturbations
— Functionsample_perturbations(perturbed::AbstractPerturbed, θ::AbstractArray)
Draw nb_samples
random perturbations from the perturbation
distribution.
InferOpt.shannon_entropy
— Methodshannon_entropy(p)
Compute the Shannon entropy of a probability distribution: H(p) = -∑ pᵢlog(pᵢ)
.
InferOpt.simplex_projection_and_support
— Methodsimplex_projection_and_support(z)
Compute the Euclidean projection p
of z
on the probability simplex (also called sparse_argmax
), and the indicators s
of its support.
Reference: https://arxiv.org/abs/1602.02068.
InferOpt.soft_rank
— Methodsoft_rank(θ::AbstractVector; ε=1.0, rev::Bool=false)
Fast differentiable ranking of vector θ.
Arguments
θ
: vector to sort
Keyword (optional) arguments
ε::Float64=1.0
: size of the regularizationrev::Bool=false
: sort in ascending order if falseregularization=:l2
: use l2 regularization if :l2, and kl regularization if :kl
See also soft_rank_l2
and soft_rank_kl
.
InferOpt.soft_rank_kl
— Methodsoft_rank_kl(θ::AbstractVector; ε=1.0, rev::Bool=false)
Rank vector θ
with kl regularization.
InferOpt.soft_rank_l2
— Methodsoft_rank_l2(θ::AbstractVector; ε=1.0, rev::Bool=false)
Rank vector θ
with l2 regularization.
InferOpt.soft_sort
— Methodsoft_sort(θ::AbstractVector; ε=1.0, rev::Bool=false, regularization=:l2)
Fast differentiable sort of vector θ.
Arguments
θ
: vector to sort
Keyword (optional) arguments
ε::Float64=1.0
: size of the regularizationrev::Bool=false
: sort in ascending order if falseregularization=:l2
: use l2 regularization if :l2, and kl regularization if :kl
See also soft_sort_l2
and soft_sort_kl
.
InferOpt.soft_sort_kl
— Methodsoft_sort_kl(θ::AbstractVector; ε=1.0, rev::Bool=false)
Sort vector θ
with kl regularization.
InferOpt.soft_sort_l2
— Methodsoft_sort_l2(θ::AbstractVector; ε=1.0, rev::Bool=false)
Sort vector θ
with l2 regularization.
InferOpt.zero_one_loss
— Methodzero_one_loss(y, y_true)
0-1 loss for multiclass classification: δ(y, y_true) = 0
if y = y_true
, and 1
otherwise.
InferOpt.zero_one_loss_maximizer
— Methodzero_one_loss_maximizer(y, y_true; α)
For δ = zero_one_loss
, compute
argmax_y {δ(y, y_true) + α θᵀ(y - y_true)}
Index
InferOpt.AbstractLayer
InferOpt.AbstractLossLayer
InferOpt.AbstractOptimizationLayer
InferOpt.AbstractPerturbed
InferOpt.AbstractPerturbed
InferOpt.AbstractRegularized
InferOpt.AbstractRegularizedGeneralizedMaximizer
InferOpt.FenchelYoungLoss
InferOpt.FenchelYoungLoss
InferOpt.FixedAtomsProbabilityDistribution
InferOpt.GeneralizedMaximizer
InferOpt.IdentityRelaxation
InferOpt.ImitationLoss
InferOpt.ImitationLoss
InferOpt.ImitationLoss
InferOpt.Interpolation
InferOpt.PerturbedAdditive
InferOpt.PerturbedAdditive
InferOpt.PerturbedMultiplicative
InferOpt.PerturbedMultiplicative
InferOpt.PerturbedOracle
InferOpt.PerturbedOracle
InferOpt.Pushforward
InferOpt.Pushforward
InferOpt.RegularizedFrankWolfe
InferOpt.RegularizedFrankWolfe
InferOpt.RegularizedFrankWolfe
InferOpt.SPOPlusLoss
InferOpt.SPOPlusLoss
InferOpt.SPOPlusLoss
InferOpt.SPOPlusLoss
InferOpt.SoftArgmax
InferOpt.SoftRank
InferOpt.SoftRank
InferOpt.SoftSort
InferOpt.SoftSort
InferOpt.SparseArgmax
InferOpt.StructuredSVMLoss
InferOpt.StructuredSVMLoss
InferOpt.StructuredSVMLoss
InferOpt.ZeroOneImitationLoss
InferOpt.ZeroOneStructuredSVMLoss
InferOpt.apply_on_atoms
InferOpt.compute_expectation
InferOpt.compute_probability_distribution
InferOpt.compute_probability_distribution
InferOpt.compute_probability_distribution
InferOpt.compute_probability_distribution_from_samples
InferOpt.compute_regularization
InferOpt.get_maximizer
InferOpt.get_y_true
InferOpt.get_y_true
InferOpt.half_square_norm
InferOpt.isproba
InferOpt.isprobadist
InferOpt.objective_value
InferOpt.one_hot_argmax
InferOpt.perturbation_grad_logdensity
InferOpt.positive_part
InferOpt.ranking
InferOpt.sample_perturbations
InferOpt.shannon_entropy
InferOpt.simplex_projection_and_support
InferOpt.soft_rank
InferOpt.soft_rank_kl
InferOpt.soft_rank_l2
InferOpt.soft_sort
InferOpt.soft_sort_kl
InferOpt.soft_sort_l2
InferOpt.zero_one_loss
InferOpt.zero_one_loss_maximizer