Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.learn.tensorflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.learn.tensorflow
Commits
4a5111e3
Commit
4a5111e3
authored
Oct 27, 2016
by
Tiago de Freitas Pereira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adde strides to the pooling issue
#12
parent
6d4910cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
bob/learn/tensorflow/layers/MaxPooling.py
bob/learn/tensorflow/layers/MaxPooling.py
+3
-2
No files found.
bob/learn/tensorflow/layers/MaxPooling.py
View file @
4a5111e3
...
...
@@ -10,12 +10,13 @@ from .Layer import Layer
class
MaxPooling
(
Layer
):
def
__init__
(
self
,
name
,
shape
=
[
1
,
2
,
2
,
1
],
activation
=
None
):
def
__init__
(
self
,
name
,
shape
=
[
1
,
2
,
2
,
1
],
strides
=
[
1
,
1
,
1
,
1
],
activation
=
None
):
"""
Constructor
"""
super
(
MaxPooling
,
self
).
__init__
(
name
,
use_gpu
=
False
,
activation
=
activation
)
self
.
shape
=
shape
self
.
strides
=
strides
def
create_variables
(
self
,
input_layer
):
self
.
input_layer
=
input_layer
...
...
@@ -23,7 +24,7 @@ class MaxPooling(Layer):
def
get_graph
(
self
):
with
tf
.
name_scope
(
str
(
self
.
name
)):
output
=
tf
.
nn
.
max_pool
(
self
.
input_layer
,
ksize
=
self
.
shape
,
strides
=
[
1
,
1
,
1
,
1
]
,
padding
=
'SAME'
)
output
=
tf
.
nn
.
max_pool
(
self
.
input_layer
,
ksize
=
self
.
shape
,
strides
=
self
.
strides
,
padding
=
'SAME'
)
if
self
.
activation
is
not
None
:
output
=
self
.
activation
(
output
)
...
...
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