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
cb6deeb2
Commit
cb6deeb2
authored
Jul 18, 2019
by
Khalique
Browse files
formatting
parent
21bb2293
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/tf/tf.cpp
src/tf/tf.cpp
+8
-8
No files found.
src/tf/tf.cpp
View file @
cb6deeb2
...
...
@@ -568,19 +568,19 @@ struct tf_parser
parse_onehot
(
const
std
::
string
&
,
attribute_map
attributes
,
std
::
vector
<
instruction_ref
>
args
)
{
// auto indices = args[0]->eval().get<int32_t>().to_vector();
size_t
depth
=
static_cast
<
size_t
>
(
args
[
1
]
->
eval
().
at
<
int32_t
>
());
int64_t
axis
=
-
1
;
size_t
depth
=
static_cast
<
size_t
>
(
args
[
1
]
->
eval
().
at
<
int32_t
>
());
int64_t
axis
=
-
1
;
// size_t num_indices = indices.size();
float
on_value
=
args
[
2
]
->
eval
().
at
<
float
>
();
float
off_value
=
args
[
3
]
->
eval
().
at
<
float
>
();
float
on_value
=
args
[
2
]
->
eval
().
at
<
float
>
();
float
off_value
=
args
[
3
]
->
eval
().
at
<
float
>
();
std
::
vector
<
float
>
depth_input
(
depth
*
depth
,
off_value
);
std
::
vector
<
float
>
depth_input
(
depth
*
depth
,
off_value
);
for
(
int
i
=
0
;
i
<
depth
;
i
++
)
{
depth_input
[
depth
*
i
+
i
]
=
on_value
;
depth_input
[
depth
*
i
+
i
]
=
on_value
;
}
if
(
contains
(
attributes
,
"axis"
))
axis
=
attributes
.
at
(
"axis"
).
i
();
if
(
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