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
8a4f5778
Commit
8a4f5778
authored
Feb 20, 2019
by
Khalique
Browse files
formatting
parent
461a68cc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
src/tf/tf.cpp
src/tf/tf.cpp
+7
-7
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+3
-2
No files found.
src/tf/tf.cpp
View file @
8a4f5778
...
@@ -43,7 +43,7 @@ struct tf_parser
...
@@ -43,7 +43,7 @@ struct tf_parser
copy
(
attrs
.
begin
(),
attrs
.
end
(),
std
::
back_inserter
(
axes
));
copy
(
attrs
.
begin
(),
attrs
.
end
(),
std
::
back_inserter
(
axes
));
if
(
is_nhwc
)
if
(
is_nhwc
)
{
{
for
(
size_t
&
axis
:
axes
)
for
(
size_t
&
axis
:
axes
)
{
{
parse_axis
(
axis
);
parse_axis
(
axis
);
}
}
...
@@ -306,7 +306,7 @@ struct tf_parser
...
@@ -306,7 +306,7 @@ struct tf_parser
{
{
l0
=
prog
.
add_instruction
(
op
::
transpose
{{
1
,
3
,
0
,
2
}},
args
[
1
]);
l0
=
prog
.
add_instruction
(
op
::
transpose
{{
1
,
3
,
0
,
2
}},
args
[
1
]);
}
}
else
if
(
l0
->
name
()
!=
"@param"
)
else
if
(
l0
->
name
()
!=
"@param"
)
MIGRAPHX_THROW
(
"cannot infer data format for weights"
);
MIGRAPHX_THROW
(
"cannot infer data format for weights"
);
return
prog
.
add_instruction
(
op
,
{
args
[
0
],
l0
});
return
prog
.
add_instruction
(
op
,
{
args
[
0
],
l0
});
...
...
test/tf/tf_test.cpp
View file @
8a4f5778
...
@@ -101,9 +101,10 @@ TEST_CASE(conv_test)
...
@@ -101,9 +101,10 @@ TEST_CASE(conv_test)
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
16
,
16
}});
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
16
,
16
}});
std
::
vector
<
float
>
weight_data
(
3
*
3
*
3
*
32
);
std
::
vector
<
float
>
weight_data
(
3
*
3
*
3
*
32
);
std
::
fill
(
weight_data
.
begin
(),
weight_data
.
end
(),
1.0
f
);
std
::
fill
(
weight_data
.
begin
(),
weight_data
.
end
(),
1.0
f
);
auto
l1
=
p
.
add_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
3
,
3
,
32
}},
weight_data
);
auto
l1
=
p
.
add_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
,
3
,
3
,
32
}},
weight_data
);
migraphx
::
op
::
convolution
op
;
migraphx
::
op
::
convolution
op
;
op
.
padding_mode
=
migraphx
::
op
::
padding_mode_t
::
same
;
op
.
padding_mode
=
migraphx
::
op
::
padding_mode_t
::
same
;
...
...
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