File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Corresponds to regularized prediction on the probability simplex with entropic p
88struct SoftArgmax <: AbstractRegularized end
99
1010(:: SoftArgmax )(z:: AbstractVector ; kwargs... ) = soft_argmax (z)
11- compute_regularization (:: SoftArgmax , y:: AbstractVector ) = soft_argmax_regularization (y)
11+ compute_regularization (:: SoftArgmax , y:: AbstractArray ) = soft_argmax_regularization (y)
1212
1313function soft_argmax (z:: AbstractVector )
1414 s = exp .(z)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Corresponds to regularized prediction on the probability simplex with square nor
88struct SparseArgmax <: AbstractRegularized end
99
1010(:: SparseArgmax )(z:: AbstractVector ; kwargs... ) = sparse_argmax (z)
11- compute_regularization (:: SparseArgmax , y:: AbstractVector ) = sparse_argmax_regularization (y)
11+ compute_regularization (:: SparseArgmax , y:: AbstractArray ) = sparse_argmax_regularization (y)
1212
1313function sparse_argmax (z:: AbstractVector ; kwargs... )
1414 p, _ = simplex_projection_and_support (z)
Original file line number Diff line number Diff line change 1+ @testitem " Test interfaces are correctly implemented" default_imports = false begin
2+ using InferOpt, RequiredInterfaces, Test
3+ const RI = RequiredInterfaces
4+
5+ @test RI. check_interface_implemented (AbstractRegularized, RegularizedFrankWolfe)
6+ @test RI. check_interface_implemented (AbstractRegularized, SoftArgmax)
7+ @test RI. check_interface_implemented (AbstractRegularized, SparseArgmax)
8+ end
You can’t perform that action at this time.
0 commit comments