Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
ca33154a
Commit
ca33154a
authored
Nov 20, 2018
by
Khalique
Browse files
added reflect function to operators
parent
1dcf8e25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/include/migraphx/operators.hpp
src/include/migraphx/operators.hpp
+8
-6
No files found.
src/include/migraphx/operators.hpp
View file @
ca33154a
...
@@ -234,10 +234,11 @@ struct leaky_relu
...
@@ -234,10 +234,11 @@ struct leaky_relu
check_shapes
{
inputs
,
*
this
}.
has
(
1
);
check_shapes
{
inputs
,
*
this
}.
has
(
1
);
return
inputs
.
front
();
return
inputs
.
front
();
}
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
leaky_relu
&
op
)
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
{
os
<<
op
.
name
()
<<
":"
<<
op
.
alpha
;
return
pack
(
f
(
self
.
alpha
,
"alpha"
));
return
os
;
}
}
};
};
...
@@ -250,10 +251,11 @@ struct elu
...
@@ -250,10 +251,11 @@ struct elu
check_shapes
{
inputs
,
*
this
}.
has
(
1
);
check_shapes
{
inputs
,
*
this
}.
has
(
1
);
return
inputs
.
front
();
return
inputs
.
front
();
}
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
elu
&
op
)
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
{
os
<<
op
.
name
()
<<
":"
<<
op
.
alpha
;
return
pack
(
f
(
self
.
alpha
,
"alpha"
));
return
os
;
}
}
};
};
...
...
Write
Preview
Markdown
is supported
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