Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
6d681454
Commit
6d681454
authored
Dec 19, 2017
by
Antoine Cully
Browse files
enable negative value for SE_AED kernel
parent
b006d4b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/limbo/kernel/squared_exp_ard.hpp
View file @
6d681454
...
...
@@ -100,7 +100,7 @@ namespace limbo {
_ell
(
i
)
=
std
::
exp
(
p
(
i
));
for
(
size_t
j
=
0
;
j
<
(
unsigned
int
)
Params
::
kernel_squared_exp_ard
::
k
();
++
j
)
for
(
size_t
i
=
0
;
i
<
_input_dim
;
++
i
)
_A
(
i
,
j
)
=
std
::
exp
(
p
((
j
+
1
)
*
_input_dim
+
i
)
)
;
_A
(
i
,
j
)
=
p
((
j
+
1
)
*
_input_dim
+
i
);
_sf2
=
std
::
exp
(
2.0
*
p
(
params_size
()
-
1
));
}
...
...
@@ -116,7 +116,7 @@ namespace limbo {
grad
.
head
(
_input_dim
)
=
(
x1
-
x2
).
cwiseQuotient
(
_ell
).
array
().
square
()
*
k
;
for
(
size_t
j
=
0
;
j
<
(
unsigned
int
)
Params
::
kernel_squared_exp_ard
::
k
();
++
j
)
{
Eigen
::
MatrixXd
G
=
-
(
x1
-
x2
).
transpose
()
*
_A
.
col
(
j
)
*
(
x1
-
x2
)
.
cwiseProduct
(
_A
.
col
(
j
)).
array
()
*
k
;
Eigen
::
MatrixXd
G
=
-
(
x1
-
x2
).
transpose
()
*
_A
.
col
(
j
)
*
(
x1
-
x2
)
*
k
;
grad
.
segment
((
j
+
1
)
*
_input_dim
,
_input_dim
)
=
G
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment