Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
2cbe42c8
Commit
2cbe42c8
authored
Dec 18, 2019
by
baojun
Committed by
Sang Ik Lee
Dec 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix type mismatch (#4077)
parent
38c3be4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
softmax_crossentropy.cpp
src/ngraph/op/fused/softmax_crossentropy.cpp
+3
-2
No files found.
src/ngraph/op/fused/softmax_crossentropy.cpp
View file @
2cbe42c8
...
...
@@ -231,7 +231,7 @@ NodeVector op::SoftmaxCrossEntropyBackprop::decompose_op() const
auto
mask_constant
=
ngraph
::
op
::
Constant
::
create
(
element
::
i64
,
labels
.
get_shape
(),
{
m_ignore_index
});
auto
not_equal
=
std
::
make_shared
<
ngraph
::
op
::
NotEqual
>
(
labels
,
mask_constant
);
auto
convert
=
std
::
make_shared
<
ngraph
::
op
::
Convert
>
(
not_equal
,
element
::
f64
);
auto
convert
=
std
::
make_shared
<
ngraph
::
op
::
Convert
>
(
not_equal
,
delta
.
get_element_type
()
);
auto
reshape
=
std
::
make_shared
<
ngraph
::
op
::
Reshape
>
(
convert
,
AxisVector
{
0
,
1
},
Shape
{
convert
->
get_shape
().
at
(
0
)});
auto
broadcast_mask
=
...
...
@@ -242,7 +242,8 @@ NodeVector op::SoftmaxCrossEntropyBackprop::decompose_op() const
make_shared
<
op
::
Reshape
>
(
labels
,
AxisVector
{
0
,
1
},
Shape
{
labels
.
get_shape
().
at
(
0
)});
auto
one_hot
=
std
::
make_shared
<
ngraph
::
op
::
OneHot
>
(
reshape_labels
,
softmax
.
get_shape
(),
one_hot_axis
);
auto
convert_one_hot
=
std
::
make_shared
<
ngraph
::
op
::
Convert
>
(
one_hot
,
element
::
f64
);
auto
convert_one_hot
=
std
::
make_shared
<
ngraph
::
op
::
Convert
>
(
one_hot
,
delta
.
get_element_type
());
if
(
delta
.
get_shape
()
!=
convert_one_hot
->
get_shape
())
{
...
...
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