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
26df5406
Commit
26df5406
authored
Feb 19, 2019
by
Khalique
Browse files
formatting
parent
3acbd087
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/tf/tf.cpp
src/tf/tf.cpp
+5
-6
No files found.
src/tf/tf.cpp
View file @
26df5406
...
...
@@ -41,7 +41,7 @@ struct tf_parser
auto
attrs
=
attributes
.
at
(
s
).
list
().
i
();
std
::
vector
<
size_t
>
axes
;
copy
(
attrs
.
begin
(),
attrs
.
end
(),
std
::
back_inserter
(
axes
));
if
(
is_nhwc
)
if
(
is_nhwc
)
{
for
(
size_t
i
=
0
;
i
<
axes
.
size
();
++
i
)
{
...
...
@@ -78,7 +78,6 @@ struct tf_parser
default:
break
;
}
}
}
tf_parser
()
...
...
@@ -209,7 +208,7 @@ struct tf_parser
parse_biasadd
(
const
std
::
string
&
,
const
attribute_map
&
,
std
::
vector
<
instruction_ref
>
args
)
{
uint64_t
axis
=
1
;
// assume output of previous layer is in NCHW (broadcast on channel)
auto
l0
=
prog
.
add_instruction
(
op
::
broadcast
{
axis
,
args
[
0
]
->
get_shape
()},
args
[
1
]);
auto
l0
=
prog
.
add_instruction
(
op
::
broadcast
{
axis
,
args
[
0
]
->
get_shape
()},
args
[
1
]);
return
prog
.
add_instruction
(
op
::
add
{},
args
[
0
],
l0
);
}
...
...
@@ -286,13 +285,13 @@ struct tf_parser
op
.
dilation
[
1
]
=
dilation
[
3
];
}
auto
l0
=
args
[
1
];
if
(
l0
->
get_operator
().
name
()
==
"transpose"
and
is_nhwc
)
if
(
l0
->
get_operator
().
name
()
==
"transpose"
and
is_nhwc
)
{
l0
=
prog
.
add_instruction
(
op
::
transpose
{{
1
,
3
,
0
,
2
}},
args
[
1
]);
}
else
l0
=
prog
.
add_instruction
(
op
::
transpose
{{
3
,
2
,
0
,
1
}},
args
[
1
]);
return
prog
.
add_instruction
(
op
,
{
args
[
0
],
l0
});
}
...
...
@@ -334,7 +333,7 @@ struct tf_parser
if
(
ksize
.
size
()
!=
4
)
{
MIGRAPHX_THROW
(
"ksize should have 4 values"
);
}
}
op
.
lengths
[
0
]
=
ksize
[
2
];
op
.
lengths
[
1
]
=
ksize
[
3
];
}
...
...
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