conv2d

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package conv2d implements a 2D bit-convolution layer and combiner

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conv2D

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

func (*Conv2D) Disregard

func (f *Conv2D) 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). This excludes training samples early which would have no impact, because the next layer would see the same thing regardless of what we put.

func (*Conv2D) Feature

func (f *Conv2D) Feature(n int) (o uint32)

Feature returns the n-th feature from the combiner. Next layer reads its inputs using this method for hashtron n in the next layer.

func (*Conv2D) Put

func (f *Conv2D) Put(n int, v bool)

Put inserts a boolean at position n.

type Conv2DLayer

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

func MustNew

func MustNew(width, height, subwidth, subheight, repeat int) *Conv2DLayer

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

func MustNew2 added in v0.0.4

func MustNew2(width, height, subwidth, subheight, repeat int, shift int) *Conv2DLayer

MustNew/ creates a new Conv2D layer with size, subsize and repeat

func New

func New(width, height, subwidth, subheight, repeat int) (o *Conv2DLayer, err error)

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

func New2 added in v0.0.4

func New2(width, height, subwidth, subheight, repeat int, shift int) (o *Conv2DLayer, err error)

New/ creates a new Conv2D layer with size, subsize and repeat

func (*Conv2DLayer) Lay

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

Lay turns Conv2D layer into a combiner

Jump to

Keyboard shortcuts

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