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
bda63363
Commit
bda63363
authored
Apr 08, 2019
by
Khalique
Browse files
formatting
parent
985d5b1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
src/tf/tf.cpp
src/tf/tf.cpp
+5
-6
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+3
-3
No files found.
src/tf/tf.cpp
View file @
bda63363
...
@@ -372,12 +372,11 @@ struct tf_parser
...
@@ -372,12 +372,11 @@ struct tf_parser
if
(
input_size
>=
4
)
if
(
input_size
>=
4
)
axis
=
parse_axis
(
axis
);
axis
=
parse_axis
(
axis
);
std
::
transform
(
args
.
begin
(),
std
::
transform
(
args
.
end
(),
args
.
begin
(),
std
::
back_inserter
(
unsqueezed_args
),
args
.
end
(),
[
&
](
instruction_ref
arg
)
{
std
::
back_inserter
(
unsqueezed_args
),
return
prog
.
add_instruction
(
op
::
unsqueeze
{{
axis
}},
arg
);
[
&
](
instruction_ref
arg
)
{
return
prog
.
add_instruction
(
op
::
unsqueeze
{{
axis
}},
arg
);
});
});
return
prog
.
add_instruction
(
op
::
concat
{
static_cast
<
size_t
>
(
axis
)},
unsqueezed_args
);
return
prog
.
add_instruction
(
op
::
concat
{
static_cast
<
size_t
>
(
axis
)},
unsqueezed_args
);
}
}
...
...
test/tf/tf_test.cpp
View file @
bda63363
...
@@ -154,9 +154,9 @@ TEST_CASE(pack_test)
...
@@ -154,9 +154,9 @@ TEST_CASE(pack_test)
TEST_CASE
(
pack_test_nhwc
)
TEST_CASE
(
pack_test_nhwc
)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
1
,
1
}});
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
1
,
1
}});
auto
l1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
1
,
1
}});
auto
l1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
1
,
1
}});
auto
l2
=
p
.
add_parameter
(
"2"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
1
,
1
}});
auto
l2
=
p
.
add_parameter
(
"2"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
1
,
1
}});
std
::
vector
<
migraphx
::
instruction_ref
>
args
{
l0
,
l1
,
l2
};
std
::
vector
<
migraphx
::
instruction_ref
>
args
{
l0
,
l1
,
l2
};
std
::
vector
<
migraphx
::
instruction_ref
>
unsqueezed_args
;
std
::
vector
<
migraphx
::
instruction_ref
>
unsqueezed_args
;
int64_t
nchw_axis
=
1
;
int64_t
nchw_axis
=
1
;
...
...
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