Pooling Aliases #
Short names for the dimension-polymorphic pooling specs.
Friendly aliases #
@[reducible, inline]
abbrev
Spec.maxPool
{α : Type}
[Context α]
{d C : ℕ}
{inSpatial kernel stride padding : Vector ℕ d}
{hKernel : ∀ (i : Fin d), kernel.get i ≠ 0}
{hStride : ∀ (i : Fin d), stride.get i ≠ 0}
(layer : MaxPoolSpec d kernel stride padding hKernel hStride)
(input : Tensor α (Shape.ofList (C :: inSpatial.toList)))
:
Tensor α (Shape.ofList (C :: (poolOutSpatialPad inSpatial kernel stride padding).toList))
Alias for max_pool_spec.
Instances For
@[reducible, inline]
abbrev
Spec.avgPool
{α : Type}
[Context α]
{d C : ℕ}
{inSpatial kernel stride padding : Vector ℕ d}
{hKernel : ∀ (i : Fin d), kernel.get i ≠ 0}
{hStride : ∀ (i : Fin d), stride.get i ≠ 0}
(layer : AvgPoolSpec d kernel stride padding hKernel hStride)
(input : Tensor α (Shape.ofList (C :: inSpatial.toList)))
:
Tensor α (Shape.ofList (C :: (poolOutSpatialPad inSpatial kernel stride padding).toList))
Alias for avg_pool_spec.
Instances For
@[reducible, inline]
abbrev
Spec.smoothMaxPool
{α : Type}
[Context α]
{d C : ℕ}
{inSpatial kernel stride padding : Vector ℕ d}
{hKernel : ∀ (i : Fin d), kernel.get i ≠ 0}
{hStride : ∀ (i : Fin d), stride.get i ≠ 0}
(layer : MaxPoolSpec d kernel stride padding hKernel hStride)
(beta : α)
(input : Tensor α (Shape.ofList (C :: inSpatial.toList)))
:
Tensor α (Shape.ofList (C :: (poolOutSpatialPad inSpatial kernel stride padding).toList))
Alias for smooth_max_pool_spec.
Instances For
@[reducible, inline]
abbrev
Spec.maxPoolBackward
{α : Type}
[Context α]
{d C : ℕ}
{inSpatial kernel stride padding : Vector ℕ d}
{hKernel : ∀ (i : Fin d), kernel.get i ≠ 0}
{hStride : ∀ (i : Fin d), stride.get i ≠ 0}
(layer : MaxPoolSpec d kernel stride padding hKernel hStride)
(input : Tensor α (Shape.ofList (C :: inSpatial.toList)))
(grad_output : Tensor α (Shape.ofList (C :: (poolOutSpatialPad inSpatial kernel stride padding).toList)))
:
Tensor α (Shape.ofList (C :: inSpatial.toList))
Alias for max_pool_backward_spec.
Instances For
@[reducible, inline]
abbrev
Spec.avgPoolBackward
{α : Type}
[Context α]
{d C : ℕ}
{inSpatial kernel stride padding : Vector ℕ d}
{hKernel : ∀ (i : Fin d), kernel.get i ≠ 0}
{hStride : ∀ (i : Fin d), stride.get i ≠ 0}
(layer : AvgPoolSpec d kernel stride padding hKernel hStride)
(grad_output : Tensor α (Shape.ofList (C :: (poolOutSpatialPad inSpatial kernel stride padding).toList)))
:
Tensor α (Shape.ofList (C :: inSpatial.toList))
Alias for avg_pool_backward_spec.
Instances For
@[reducible, inline]
abbrev
Spec.smoothMaxPoolBackward
{α : Type}
[Context α]
{d C : ℕ}
{inSpatial kernel stride padding : Vector ℕ d}
{hKernel : ∀ (i : Fin d), kernel.get i ≠ 0}
{hStride : ∀ (i : Fin d), stride.get i ≠ 0}
(layer : MaxPoolSpec d kernel stride padding hKernel hStride)
(beta : α)
(input : Tensor α (Shape.ofList (C :: inSpatial.toList)))
(grad_output : Tensor α (Shape.ofList (C :: (poolOutSpatialPad inSpatial kernel stride padding).toList)))
:
Tensor α (Shape.ofList (C :: inSpatial.toList))
Alias for smooth_max_pool_backward_spec.