sum

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package sum implements a sum layer and combiner

Package sum implements a sum layer and combiner

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sum

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

func (*Sum) Disregard

func (f *Sum) 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 (*Sum) Feature

func (f *Sum) 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 (*Sum) Put

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

Put inserts a boolean at position n.

type SumLayer

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

func MustNew

func MustNew(dims []uint, dim uint) *SumLayer

MustNew creates a new full layer with size and bits

func New

func New(dims []uint, dim uint) (o *SumLayer, err error)

New creates a new full layer with size and bits

func (*SumLayer) Lay

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

Lay turns full layer into a combiner

Jump to

Keyboard shortcuts

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