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
27ff6a18
Commit
27ff6a18
authored
Jan 08, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix example about dropout
parent
34c12fc9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
3 deletions
+4
-3
example_alexnet.py
example_alexnet.py
+1
-1
example_cifar10.py
example_cifar10.py
+1
-1
example_mnist.py
example_mnist.py
+1
-1
tensorpack/models/pool.py
tensorpack/models/pool.py
+1
-0
No files found.
example_alexnet.py
View file @
27ff6a18
...
...
@@ -25,7 +25,7 @@ CAPACITY = MIN_AFTER_DEQUEUE + 3 * BATCH_SIZE
def
get_model
(
inputs
,
is_training
):
# img: 227x227x3
is_training
=
bool
(
is_training
)
keep_prob
=
tf
.
constant
(
0.5
if
is_training
else
1
.0
)
keep_prob
=
tf
.
constant
(
0.5
if
is_training
else
0
.0
)
image
,
label
=
inputs
...
...
example_cifar10.py
View file @
27ff6a18
...
...
@@ -28,7 +28,7 @@ MIN_AFTER_DEQUEUE = int(50000 * 0.4)
CAPACITY
=
MIN_AFTER_DEQUEUE
+
3
*
BATCH_SIZE
def
get_model
(
inputs
,
is_training
):
#keep_prob = tf.constant(0.5 if is_training else
1
.0)
#keep_prob = tf.constant(0.5 if is_training else
0
.0)
image
,
label
=
inputs
...
...
example_mnist.py
View file @
27ff6a18
...
...
@@ -36,7 +36,7 @@ def get_model(inputs, is_training):
cost: the cost to minimize. scalar variable
"""
is_training
=
bool
(
is_training
)
keep_prob
=
tf
.
constant
(
0.5
if
is_training
else
1
.0
)
keep_prob
=
tf
.
constant
(
0.5
if
is_training
else
0
.0
)
image
,
label
=
inputs
image
=
tf
.
expand_dims
(
image
,
3
)
# add a single channel
...
...
tensorpack/models/pool.py
View file @
27ff6a18
...
...
@@ -44,6 +44,7 @@ def FixedUnPooling(x, shape, unpool_mat=None):
unpool_mat
=
tf
.
Variable
(
mat
,
trainable
=
False
,
name
=
'unpool_mat'
)
assert
unpool_mat
.
get_shape
()
.
as_list
()
==
list
(
shape
)
# perform a tensor-matrix kronecker product
fx
=
flatten
(
tf
.
transpose
(
x
,
[
0
,
3
,
1
,
2
]))
fx
=
tf
.
expand_dims
(
fx
,
-
1
)
# (bchw)x1
mat
=
tf
.
expand_dims
(
flatten
(
unpool_mat
),
0
)
#1x(shxsw)
...
...
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