Class: Chainer::Functions::Pooling::Pooling2D
- Inherits:
-
Chainer::FunctionNode
- Object
- Chainer::FunctionNode
- Chainer::Functions::Pooling::Pooling2D
- Defined in:
- lib/chainer/functions/pooling/pooling_2d.rb
Overview
Base class of pooling function over a set of 2d planes
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cover_all ⇒ Object
readonly
Returns the value of attribute cover_all.
-
#kh ⇒ Object
readonly
Returns the value of attribute kh.
-
#kw ⇒ Object
readonly
Returns the value of attribute kw.
-
#ph ⇒ Object
readonly
Returns the value of attribute ph.
-
#pw ⇒ Object
readonly
Returns the value of attribute pw.
-
#sx ⇒ Object
readonly
Returns the value of attribute sx.
-
#sy ⇒ Object
readonly
Returns the value of attribute sy.
Attributes inherited from Chainer::FunctionNode
Instance Method Summary collapse
-
#initialize(ksize, stride: nil, pad: 0, cover_all: true) ⇒ Pooling2D
constructor
A new instance of Pooling2D.
Methods inherited from Chainer::FunctionNode
#apply, #backward, #backward_accumulate, #forward, #forward_cpu, #get_retained_inputs, #get_retained_outputs, #label, #output_data, #retain_inputs, #retain_outputs, #unchain
Constructor Details
#initialize(ksize, stride: nil, pad: 0, cover_all: true) ⇒ Pooling2D
Returns a new instance of Pooling2D.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 8 def initialize(ksize, stride: nil, pad: 0, cover_all: true) if stride.nil? stride = ksize end @kh, @kw = ksize.is_a?(::Array) ? ksize : [ksize, ksize] @sy, @sx = stride.is_a?(::Array) ? stride : [stride, stride] @ph, @pw = pad.is_a?(::Array) ? pad: [pad, pad] @cover_all = cover_all end |
Instance Attribute Details
#cover_all ⇒ Object (readonly)
Returns the value of attribute cover_all.
6 7 8 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 6 def cover_all @cover_all end |
#kh ⇒ Object (readonly)
Returns the value of attribute kh.
6 7 8 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 6 def kh @kh end |
#kw ⇒ Object (readonly)
Returns the value of attribute kw.
6 7 8 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 6 def kw @kw end |
#ph ⇒ Object (readonly)
Returns the value of attribute ph.
6 7 8 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 6 def ph @ph end |
#pw ⇒ Object (readonly)
Returns the value of attribute pw.
6 7 8 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 6 def pw @pw end |
#sx ⇒ Object (readonly)
Returns the value of attribute sx.
6 7 8 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 6 def sx @sx end |
#sy ⇒ Object (readonly)
Returns the value of attribute sy.
6 7 8 |
# File 'lib/chainer/functions/pooling/pooling_2d.rb', line 6 def sy @sy end |