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
395ccd2c
"test/vscode:/vscode.git/clone" did not exist on "5fbe212841eaef7082e5e59df64d2b99663ba906"
Commit
395ccd2c
authored
Feb 25, 2019
by
Khalique
Browse files
rewrite parse axis
parent
b02a8685
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/tf/tf.cpp
src/tf/tf.cpp
+7
-6
No files found.
src/tf/tf.cpp
View file @
395ccd2c
...
...
@@ -65,18 +65,19 @@ struct tf_parser
template
<
class
T
>
T
parse_axis
(
const
T
&
dim
)
const
{
T
new_dim
=
dim
;
if
(
is_nhwc
)
{
switch
(
dim
)
{
case
0
:
return
0
;
case
1
:
return
2
;
case
2
:
return
3
;
case
3
:
return
1
;
default:
re
turn
T
{
dim
}
;
case
0
:
new_dim
=
0
;
break
;
case
1
:
new_dim
=
2
;
break
;
case
2
:
new_dim
=
3
;
break
;
case
3
:
new_dim
=
1
;
break
;
default:
b
re
ak
;
}
}
return
T
{
dim
}
;
return
new_
dim
;
}
std
::
vector
<
int64_t
>
get_axes
(
size_t
num_axes
)
const
...
...
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