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
11a2dd87
Commit
11a2dd87
authored
Feb 07, 2019
by
Shucai Xiao
Browse files
Merge branch 'gru_operator' into lstm_operator
parents
327452ab
a40e58d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/rewrite_rnn.cpp
src/rewrite_rnn.cpp
+5
-4
No files found.
src/rewrite_rnn.cpp
View file @
11a2dd87
...
...
@@ -479,11 +479,12 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
instruction_ref
hidden_states
=
prog
.
end
();
instruction_ref
last_output
{};
long
seq_len
=
static_cast
<
long
>
(
seq
->
get_shape
().
lens
()[
0
]);
long
hs
=
static_cast
<
long
>
(
r
->
get_shape
().
lens
()[
2
]);
migraphx
::
shape
seq_shape
=
seq
->
get_shape
();
migraphx
::
shape
r_shape
=
r
->
get_shape
();
long
seq_len
=
static_cast
<
long
>
(
seq_shape
.
lens
()[
0
]);
long
hs
=
static_cast
<
long
>
(
r_shape
.
lens
()[
2
]);
migraphx
::
shape
s
(
seq
->
get_shape
().
type
(),
{
seq
->
get_shape
().
lens
()[
1
],
static_cast
<
std
::
size_t
>
(
hs
)});
migraphx
::
shape
s
(
seq_shape
.
type
(),
{
seq_shape
.
lens
()[
1
],
r_shape
.
lens
()[
2
]});
std
::
vector
<
int
>
data
(
s
.
elements
(),
1
);
auto
l1
=
prog
.
add_literal
(
migraphx
::
literal
{
s
,
data
});
...
...
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