Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
opencv
Commits
bab4bc09
Commit
bab4bc09
authored
Aug 01, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9284 from ipuustin:dnn-opencl-fixes
parents
f6c4901b
c2de5cf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
activations.cl
modules/dnn/src/opencl/activations.cl
+3
-4
No files found.
modules/dnn/src/opencl/activations.cl
View file @
bab4bc09
...
...
@@ -21,13 +21,13 @@ __kernel void TanHForward(const int count, __global T* in, __global T* out) {
__kernel
void
SigmoidForward
(
const
int
count,
__global
const
T*
in,
__global
T*
out
)
{
int
index
=
get_global_id
(
0
)
;
if
(
index
<
count
)
out[index]
=
1.
/
(
1.
+
exp
(
-in[index]
))
;
out[index]
=
1.
0f
/
(
1.0f
+
exp
(
-in[index]
))
;
}
__kernel
void
BNLLForward
(
const
int
n,
__global
const
T*
in,
__global
T*
out
)
{
int
index
=
get_global_id
(
0
)
;
if
(
index
<
n
)
{
out[index]
=
in[index]
>
0
?
in[index]
+
log
(
1.
+
exp
(
-in[index]
))
:
log
(
1.
+
exp
(
in[index]
))
;
out[index]
=
in[index]
>
0
?
in[index]
+
log
(
1.
0f
+
exp
(
-in[index]
))
:
log
(
1.0f
+
exp
(
in[index]
))
;
}
}
...
...
@@ -41,4 +41,4 @@ __kernel void PowForward(const int n, __global const T* in, __global T* out, con
int
index
=
get_global_id
(
0
)
;
if
(
index
<
n
)
out[index]
=
pow
(
shift
+
scale
*
in[index],
power
)
;
}
\ No newline at end of file
}
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