Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
4c1d57d2
Commit
4c1d57d2
authored
Dec 15, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notes about tf.nn.leaky_relu
parent
205a9ff4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
tensorpack/models/nonlin.py
tensorpack/models/nonlin.py
+5
-0
No files found.
tensorpack/models/nonlin.py
View file @
4c1d57d2
...
@@ -7,6 +7,8 @@ import tensorflow as tf
...
@@ -7,6 +7,8 @@ import tensorflow as tf
from
.common
import
layer_register
,
VariableHolder
from
.common
import
layer_register
,
VariableHolder
from
.batch_norm
import
BatchNorm
from
.batch_norm
import
BatchNorm
from
..tfutils.common
import
get_tf_version_number
from
..utils
import
logger
__all__
=
[
'Maxout'
,
'PReLU'
,
'LeakyReLU'
,
'BNReLU'
]
__all__
=
[
'Maxout'
,
'PReLU'
,
'LeakyReLU'
,
'BNReLU'
]
...
@@ -71,6 +73,9 @@ def LeakyReLU(x, alpha, name='output'):
...
@@ -71,6 +73,9 @@ def LeakyReLU(x, alpha, name='output'):
x (tf.Tensor): input
x (tf.Tensor): input
alpha (float): the slope.
alpha (float): the slope.
"""
"""
# TODO
if
get_tf_version_number
()
>=
1.4
:
logger
.
warn
(
"You are recommended to use tf.nn.leaky_relu available since TF 1.4 rather than models.LeakyReLU."
)
return
tf
.
maximum
(
x
,
alpha
*
x
,
name
=
name
)
return
tf
.
maximum
(
x
,
alpha
*
x
,
name
=
name
)
...
...
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