majpool2d

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Overview

Package majpool2d implements a 2D majority pooling layer and combiner

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MajPool2D

type MajPool2D struct {
	// contains filtered or unexported fields
}

func (*MajPool2D) Disregard

func (s *MajPool2D) Disregard(n int) bool

Disregard tells whether putting value false at position n would not affect any feature output (as opposed to putting value true at position n).

func (*MajPool2D) Feature

func (s *MajPool2D) Feature(m int) (o uint32)

Feature returns the m-th feature from the combiner.

func (*MajPool2D) Put

func (s *MajPool2D) Put(n int, v bool)

Put sets the n-th bool directly and rotates the matrices if necessary.

type MajPool2DLayer

type MajPool2DLayer struct {
	// contains filtered or unexported fields
}

func MustNew

func MustNew(width, height, subwidth, subheight, capwidth, capheight, repeat int) *MajPool2DLayer

MustNew creates a new MajPool2D layer with size, subsize and repeat

func MustNew2 added in v0.0.5

func MustNew2(width, height, subwidth, subheight, capwidth, capheight, repeat, bias int) *MajPool2DLayer

MustNew2 creates a new MajPool2D layer with size, subsize and repeat

func New

func New(width, height, subwidth, subheight, capwidth, capheight, repeat int) (*MajPool2DLayer, error)

New creates a new MajPool2D layer with size, subsize and repeat

func New2 added in v0.0.5

func New2(width, height, subwidth, subheight, capwidth, capheight, repeat, bias int) (o *MajPool2DLayer, err error)

New2 creates a new MajPool2D layer with size, subsize and repeat

func (*MajPool2DLayer) Lay

func (i *MajPool2DLayer) Lay() layer.Combiner

Lay turns MajPool2D layer into a combiner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL