Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BayesianOptimization
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shamith2
BayesianOptimization
Commits
4ada0cbd
Unverified
Commit
4ada0cbd
authored
5 years ago
by
Shamith Achanta
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update benchmarks.py
parent
c5cbf3cb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
HyperSphere/test_functions/benchmarks.py
+2
-2
2 additions, 2 deletions
HyperSphere/test_functions/benchmarks.py
with
2 additions
and
2 deletions
HyperSphere/test_functions/benchmarks.py
+
2
−
2
View file @
4ada0cbd
...
...
@@ -3,7 +3,7 @@ import torch
from
torch.autograd
import
Variable
def
bird
(
x
):
def
bird
y
(
x
):
flat
=
x
.
dim
()
==
1
if
flat
:
x
=
x
.
view
(
1
,
-
1
)
...
...
@@ -274,4 +274,4 @@ rotatedstyblinskitang.dim = 0
def
generate_orthogonal_matrix
(
ndim
):
x
=
torch
.
exp
(
torch
.
sin
(
torch
.
linspace
(
-
ndim
**
0.5
,
ndim
**
0.5
,
ndim
)))
gram_mat
=
torch
.
exp
(
-
(
x
.
unsqueeze
(
1
).
repeat
(
1
,
ndim
)
-
x
.
unsqueeze
(
0
).
repeat
(
ndim
,
1
))
**
2
)
return
torch
.
qr
(
gram_mat
)[
0
]
\ No newline at end of file
return
torch
.
qr
(
gram_mat
)[
0
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment