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
fbbd435a
Commit
fbbd435a
authored
Sep 14, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use tf.layers.dropout. Add gitter badge.
parent
5c9174db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
README.md
README.md
+2
-1
tensorpack/models/regularize.py
tensorpack/models/regularize.py
+2
-2
No files found.
README.md
View file @
fbbd435a
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
A neural net training interface based on TensorFlow.
A neural net training interface based on TensorFlow.
[

](https://travis-ci.org/ppwwyyxx/tensorpack)
[

](https://travis-ci.org/ppwwyyxx/tensorpack)
[

](http://tensorpack.readthedocs.io/en/latest/index.html)
[

](http://tensorpack.readthedocs.io/en/latest/index.html)
[

](https://gitter.im/tensorpack/users)
See some
[
examples
](
examples
)
to learn about the framework:
See some
[
examples
](
examples
)
to learn about the framework:
...
...
tensorpack/models/regularize.py
View file @
fbbd435a
...
@@ -95,5 +95,5 @@ def Dropout(x, keep_prob=0.5, is_training=None, noise_shape=None):
...
@@ -95,5 +95,5 @@ def Dropout(x, keep_prob=0.5, is_training=None, noise_shape=None):
"""
"""
if
is_training
is
None
:
if
is_training
is
None
:
is_training
=
get_current_tower_context
()
.
is_training
is_training
=
get_current_tower_context
()
.
is_training
keep_prob
=
tf
.
constant
(
keep_prob
if
is_training
else
1.0
)
return
tf
.
layers
.
dropout
(
return
tf
.
nn
.
dropout
(
x
,
keep_prob
,
noise_shape
=
noise_shape
)
x
,
rate
=
1
-
keep_prob
,
noise_shape
=
noise_shape
,
training
=
is_training
)
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