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
c6a20452
Commit
c6a20452
authored
7 years ago
by
Salem Derisavi
Committed by
Tianqi Chen
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed algorithm. padding should be on both sides (#489)
parent
a3cbefd8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tutorials/optimize/opt_conv_cuda.py
+2
-2
No files found.
tutorials/optimize/opt_conv_cuda.py
View file @
c6a20452
...
@@ -36,10 +36,10 @@ stride = 1
...
@@ -36,10 +36,10 @@ stride = 1
# Algorithm
# Algorithm
A
=
tvm
.
placeholder
((
in_size
,
in_size
,
in_channel
,
batch
),
name
=
'A'
)
A
=
tvm
.
placeholder
((
in_size
,
in_size
,
in_channel
,
batch
),
name
=
'A'
)
W
=
tvm
.
placeholder
((
kernel
,
kernel
,
in_channel
,
out_channel
),
name
=
'W'
)
W
=
tvm
.
placeholder
((
kernel
,
kernel
,
in_channel
,
out_channel
),
name
=
'W'
)
out_size
=
(
in_size
-
kernel
+
pad
)
//
stride
+
1
out_size
=
(
in_size
-
kernel
+
2
*
pad
)
//
stride
+
1
# Pad input
# Pad input
Apad
=
tvm
.
compute
(
Apad
=
tvm
.
compute
(
(
in_size
+
pad
,
in_size
+
pad
,
in_channel
,
batch
),
(
in_size
+
2
*
pad
,
in_size
+
2
*
pad
,
in_channel
,
batch
),
lambda
yy
,
xx
,
cc
,
nn
:
tvm
.
select
(
lambda
yy
,
xx
,
cc
,
nn
:
tvm
.
select
(
tvm
.
all
(
yy
>=
pad
,
yy
-
pad
<
in_size
,
tvm
.
all
(
yy
>=
pad
,
yy
-
pad
<
in_size
,
xx
>=
pad
,
xx
-
pad
<
in_size
),
xx
>=
pad
,
xx
-
pad
<
in_size
),
...
...
This diff is collapsed.
Click to expand it.
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