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
d527d5d2
"test/instruction.cpp" did not exist on "d18238bbe04fe89518586aa9a564332c35bea8eb"
Commit
d527d5d2
authored
Feb 05, 2019
by
Shucai Xiao
Browse files
clang format
parent
148e548d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+2
-1
src/rewrite_gru.cpp
src/rewrite_gru.cpp
+15
-16
No files found.
src/onnx/onnx.cpp
View file @
d527d5d2
...
@@ -819,7 +819,8 @@ struct onnx_parser
...
@@ -819,7 +819,8 @@ struct onnx_parser
auto
names
=
attributes
.
at
(
"activations"
).
strings
();
auto
names
=
attributes
.
at
(
"activations"
).
strings
();
vec_names
.
clear
();
vec_names
.
clear
();
vec_names
.
resize
(
names
.
size
());
vec_names
.
resize
(
names
.
size
());
std
::
transform
(
names
.
begin
(),
names
.
end
(),
vec_names
.
begin
(),
[]
(
auto
&
str
)
{
return
str
;
});
std
::
transform
(
names
.
begin
(),
names
.
end
(),
vec_names
.
begin
(),
[](
auto
&
str
)
{
return
str
;
});
}
}
// need 4 activation functions
// need 4 activation functions
...
...
src/rewrite_gru.cpp
View file @
d527d5d2
...
@@ -352,12 +352,12 @@ std::vector<operation> rewrite_gru::compute_actv_funcs(instruction_ref ins) cons
...
@@ -352,12 +352,12 @@ std::vector<operation> rewrite_gru::compute_actv_funcs(instruction_ref ins) cons
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
0
)};
gru_op
.
actv_funcs
.
at
(
0
)};
else
if
(
gru_op
.
actv_funcs
.
size
()
==
2
)
else
if
(
gru_op
.
actv_funcs
.
size
()
==
2
)
return
{
gru_op
.
actv_funcs
.
at
(
0
),
return
{
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
1
),
gru_op
.
actv_funcs
.
at
(
1
),
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
1
)};
gru_op
.
actv_funcs
.
at
(
1
)};
else
if
(
gru_op
.
actv_funcs
.
size
()
==
3
)
else
if
(
gru_op
.
actv_funcs
.
size
()
==
3
)
return
{
gru_op
.
actv_funcs
.
at
(
0
),
return
{
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
1
),
gru_op
.
actv_funcs
.
at
(
1
),
gru_op
.
actv_funcs
.
at
(
2
),
gru_op
.
actv_funcs
.
at
(
2
),
...
@@ -369,9 +369,8 @@ std::vector<operation> rewrite_gru::compute_actv_funcs(instruction_ref ins) cons
...
@@ -369,9 +369,8 @@ std::vector<operation> rewrite_gru::compute_actv_funcs(instruction_ref ins) cons
{
{
if
(
gru_op
.
actv_funcs
.
empty
())
if
(
gru_op
.
actv_funcs
.
empty
())
return
{
op
::
sigmoid
{},
op
::
tanh
{}};
return
{
op
::
sigmoid
{},
op
::
tanh
{}};
else
if
(
gru_op
.
actv_funcs
.
size
()
==
1
)
else
if
(
gru_op
.
actv_funcs
.
size
()
==
1
)
return
{
gru_op
.
actv_funcs
.
at
(
0
),
return
{
gru_op
.
actv_funcs
.
at
(
0
),
gru_op
.
actv_funcs
.
at
(
0
)};
gru_op
.
actv_funcs
.
at
(
0
)};
else
else
return
gru_op
.
actv_funcs
;
return
gru_op
.
actv_funcs
;
}
}
...
...
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