Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
4e573235
Commit
4e573235
authored
Jan 25, 2019
by
Zhebin Jin
Committed by
Siva
Jan 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TOPI] Fix uint8 resize_bilinear issue. (#2490)
Signed-off-by: Zhebin Jin <zhebin.jzb@alibaba-inc.com>
parent
6d6762f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
topi/include/topi/image/resize.h
+8
-8
No files found.
topi/include/topi/image/resize.h
View file @
4e573235
...
...
@@ -54,10 +54,10 @@ inline Expr bilinear_sample_nchw(const Tensor& input, const Array<Expr>& indices
auto
C
=
input
(
indices
[
0
],
indices
[
1
],
y1
,
x0
);
auto
D
=
input
(
indices
[
0
],
indices
[
1
],
y1
,
x1
);
auto
top
=
A
+
(
B
-
A
)
*
x_lerp
;
auto
bottom
=
C
+
(
D
-
C
)
*
x_lerp
;
return
(
top
+
(
bottom
-
top
)
*
y_lerp
)
;
return
A
*
(
1
-
x_lerp
)
*
(
1
-
y_lerp
)
+
B
*
x_lerp
*
(
1
-
y_lerp
)
+
C
*
(
1
-
x_lerp
)
*
y_lerp
+
D
*
x_lerp
*
y_lerp
;
}
/*!
...
...
@@ -231,10 +231,10 @@ inline Tensor resize_bilinear_nhwc(const Tensor& input,
auto
C
=
input
(
indices
[
0
],
y1
,
x0
,
indices
[
3
]);
auto
D
=
input
(
indices
[
0
],
y1
,
x1
,
indices
[
3
]);
auto
top
=
A
+
(
B
-
A
)
*
x_lerp
;
auto
bottom
=
C
+
(
D
-
C
)
*
x_lerp
;
return
(
top
+
(
bottom
-
top
)
*
y_lerp
)
;
return
A
*
(
1
-
x_lerp
)
*
(
1
-
y_lerp
)
+
B
*
x_lerp
*
(
1
-
y_lerp
)
+
C
*
(
1
-
x_lerp
)
*
y_lerp
+
D
*
x_lerp
*
y_lerp
;
},
name
,
tag
);
}
...
...
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