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
1a37d4d2
Commit
1a37d4d2
authored
Jan 30, 2019
by
Shucai Xiao
Browse files
fix two format issues.
parent
f1bce841
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+2
-2
src/rewrite_rnn.cpp
src/rewrite_rnn.cpp
+1
-2
No files found.
src/onnx/onnx.cpp
View file @
1a37d4d2
...
...
@@ -798,9 +798,9 @@ struct onnx_parser
// For RNN, LSTM, and GRU operators, one of the input arguments
// is prim::Undefined, and it is ignored by protobuf. We use a
// hack to ignore this argument for these three operators
const
std
::
string
op_type
=
node
.
op_type
();
const
std
::
string
&
op_type
=
node
.
op_type
();
if
((
op_type
==
"RNN"
||
op_type
==
"LSTM"
||
op_type
==
"GRU"
)
&&
input
.
empty
()
==
true
)
input
.
empty
())
{
continue
;
}
...
...
src/rewrite_rnn.cpp
View file @
1a37d4d2
...
...
@@ -183,10 +183,9 @@ std::vector<instruction_ref> rewrite_rnn::rnn_cell(bool is_forward,
instruction_ref
hidden_out
,
last_out
;
std
::
size_t
seq_len
=
input
->
get_shape
().
lens
()[
0
];
long
seq_index
=
is_forward
?
0
:
seq_len
-
1
;
for
(
std
::
size_t
i
=
0
;
i
<
seq_len
;
i
++
)
{
seq_index
=
is_forward
?
i
:
(
seq_len
-
1
-
i
);
long
seq_index
=
is_forward
?
i
:
(
seq_len
-
1
-
i
);
auto
xt
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
seq_index
},
{
seq_index
+
1
}},
input
);
xt
=
prog
.
insert_instruction
(
ins
,
op
::
squeeze
{{
0
}},
xt
);
auto
xt_wi
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
xt
,
tran_sw
);
...
...
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