Skip to content

Commit

Permalink
Update sphere.py: remove useless functions (#1581)
Browse files Browse the repository at this point in the history
* Update sphere.py: remove useless functions

* Update sphere.py

* Update sphere.py

* black
  • Loading branch information
teytaud authored Dec 7, 2023
1 parent 8a99c0f commit aab2282
Showing 1 changed file with 84 additions and 20 deletions.
104 changes: 84 additions & 20 deletions nevergrad/common/sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,30 +224,30 @@ def Riesz_noblur_gradient(
return x


def Riesz_noblur_bigconv_loworder(n, shape, budget=default_budget):
return Riesz_noblur_gradient(
n, shape, default_steps, order=0.5, step_size=default_stepsize, conv=[24, 24]
)
# def Riesz_noblur_bigconv_loworder(n, shape, budget=default_budget):
# return Riesz_noblur_gradient(
# n, shape, default_steps, order=0.5, step_size=default_stepsize, conv=[24, 24]
# )


def Riesz_noblur_bigconv_midorder(n, shape, budget=default_budget):
return Riesz_noblur_gradient(n, shape, default_steps, order=1, step_size=default_stepsize, conv=[24, 24])
# def Riesz_noblur_bigconv_midorder(n, shape, budget=default_budget):
# return Riesz_noblur_gradient(n, shape, default_steps, order=1, step_size=default_stepsize, conv=[24, 24])


def Riesz_noblur_bigconv_highorder(n, shape, budget=default_budget):
return Riesz_noblur_gradient(n, shape, default_steps, order=2, step_size=default_stepsize, conv=[24, 24])
# def Riesz_noblur_bigconv_highorder(n, shape, budget=default_budget):
# return Riesz_noblur_gradient(n, shape, default_steps, order=2, step_size=default_stepsize, conv=[24, 24])


def Riesz_noblur_medconv_loworder(n, shape, budget=default_budget):
return Riesz_noblur_gradient(n, shape, default_steps, order=0.5, step_size=default_stepsize, conv=[8, 8])
# def Riesz_noblur_medconv_loworder(n, shape, budget=default_budget):
# return Riesz_noblur_gradient(n, shape, default_steps, order=0.5, step_size=default_stepsize, conv=[8, 8])


def Riesz_noblur_medconv_midorder(n, shape, budget=default_budget):
return Riesz_noblur_gradient(n, shape, default_steps, order=1, step_size=default_stepsize, conv=[8, 8])
# def Riesz_noblur_medconv_midorder(n, shape, budget=default_budget):
# return Riesz_noblur_gradient(n, shape, default_steps, order=1, step_size=default_stepsize, conv=[8, 8])


def Riesz_noblur_medconv_highorder(n, shape, budget=default_budget):
return Riesz_noblur_gradient(n, shape, default_steps, order=2, step_size=default_stepsize, conv=[8, 8])
# def Riesz_noblur_medconv_highorder(n, shape, budget=default_budget):
# return Riesz_noblur_gradient(n, shape, default_steps, order=2, step_size=default_stepsize, conv=[8, 8])


def Riesz_noblur_lowconv_loworder(n, shape, budget=default_budget):
Expand All @@ -262,6 +262,58 @@ def Riesz_noblur_lowconv_highorder(n, shape, budget=default_budget):
return Riesz_noblur_gradient(n, shape, default_steps, order=2, step_size=default_stepsize, conv=[2, 2])


def Riesz_blursum_lowconv_hugeorder(n, shape, budget=default_budget):
return Riesz_blursum_gradient(n, shape, default_steps, order=5, step_size=default_stepsize, conv=[2, 2])


def Riesz_blursum_medconv_hugeorder(n, shape, budget=default_budget):
return Riesz_blursum_gradient(n, shape, default_steps, order=5, step_size=default_stepsize, conv=[8, 8])


def Riesz_blursum_highconv_hugeorder(n, shape, budget=default_budget):
return Riesz_blursum_gradient(n, shape, default_steps, order=5, step_size=default_stepsize, conv=[24, 24])


def Riesz_blursum_lowconv_tinyorder(n, shape, budget=default_budget):
return Riesz_blursum_gradient(n, shape, default_steps, order=0.3, step_size=default_stepsize, conv=[2, 2])


def Riesz_blursum_medconv_tinyorder(n, shape, budget=default_budget):
return Riesz_blursum_gradient(n, shape, default_steps, order=0.3, step_size=default_stepsize, conv=[8, 8])


def Riesz_blursum_highconv_tinyorder(n, shape, budget=default_budget):
return Riesz_blursum_gradient(
n, shape, default_steps, order=0.3, step_size=default_stepsize, conv=[24, 24]
)


def Riesz_blurred_lowconv_hugeorder(n, shape, budget=default_budget):
return Riesz_blurred_gradient(n, shape, default_steps, order=5, step_size=default_stepsize, conv=[2, 2])


def Riesz_blurred_medconv_hugeorder(n, shape, budget=default_budget):
return Riesz_blurred_gradient(n, shape, default_steps, order=5, step_size=default_stepsize, conv=[8, 8])


def Riesz_blurred_highconv_hugeorder(n, shape, budget=default_budget):
return Riesz_blurred_gradient(n, shape, default_steps, order=5, step_size=default_stepsize, conv=[24, 24])


def Riesz_blurred_lowconv_tinyorder(n, shape, budget=default_budget):
return Riesz_blurred_gradient(n, shape, default_steps, order=0.3, step_size=default_stepsize, conv=[2, 2])


def Riesz_blurred_medconv_tinyorder(n, shape, budget=default_budget):
return Riesz_blurred_gradient(n, shape, default_steps, order=0.3, step_size=default_stepsize, conv=[8, 8])


def Riesz_blurred_highconv_tinyorder(n, shape, budget=default_budget):
return Riesz_blurred_gradient(
n, shape, default_steps, order=0.3, step_size=default_stepsize, conv=[24, 24]
)


def Riesz_blursum_bigconv_loworder(n, shape, budget=default_budget):
return Riesz_blursum_gradient(
n, shape, default_steps, order=0.5, step_size=default_stepsize, conv=[24, 24]
Expand Down Expand Up @@ -704,12 +756,24 @@ def metric_pack_conv(x, budget=default_budget):
"Riesz_blurred_lowconv_loworder",
"Riesz_blurred_lowconv_midorder",
"Riesz_blurred_lowconv_highorder",
"Riesz_noblur_bigconv_loworder",
"Riesz_noblur_bigconv_midorder",
"Riesz_noblur_bigconv_highorder",
"Riesz_noblur_medconv_loworder",
"Riesz_noblur_medconv_midorder",
"Riesz_noblur_medconv_highorder",
"Riesz_blursum_lowconv_hugeorder",
"Riesz_blursum_medconv_hugeorder",
"Riesz_blursum_highconv_hugeorder",
"Riesz_blursum_lowconv_tinyorder",
"Riesz_blursum_medconv_tinyorder",
"Riesz_blursum_highconv_tinyorder",
"Riesz_blurred_lowconv_hugeorder",
"Riesz_blurred_medconv_hugeorder",
"Riesz_blurred_highconv_hugeorder",
"Riesz_blurred_lowconv_tinyorder",
"Riesz_blurred_medconv_tinyorder",
"Riesz_blurred_highconv_tinyorder",
# "Riesz_noblur_bigconv_loworder",
# "Riesz_noblur_bigconv_midorder",
# "Riesz_noblur_bigconv_highorder",
# "Riesz_noblur_medconv_loworder",
# "Riesz_noblur_medconv_midorder",
# "Riesz_noblur_medconv_highorder",
"Riesz_noblur_lowconv_loworder",
"Riesz_noblur_lowconv_midorder",
"Riesz_noblur_lowconv_highorder",
Expand Down

0 comments on commit aab2282

Please sign in to comment.