patgen

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: BSD-3-Clause Imports: 6 Imported by: 57

README

GoDoc

Package patgen contains functions that generate patterns, typically based on various constrained-forms of random patterns, e.g., permuted binary random patterns.

Documentation

Overview

Package patgen contains functions that generate patterns, typically based on various constrained-forms of random patterns

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PermutedBinary

func PermutedBinary(tsr etensor.Tensor, nOn int, onVal, offVal float64)

PermutedBinary sets the given tensor to contain nOn onVal values and the remainder are offVal values, using a permuted order of tensor elements (i.e., randomly shuffled or permuted).

func PermutedBinaryRows

func PermutedBinaryRows(tsr etensor.Tensor, nOn int, onVal, offVal float64)

PermutedBinaryRows treats the tensor as a column of rows as in a etable.Table and sets each row to contain nOn onVal values and the remainder are offVal values, using a permuted order of tensor elements (i.e., randomly shuffled or permuted).

func ReshapeCpp added in v1.0.0

func ReshapeCpp(dt *etable.Table)

ReshapeCpp fixes C++ emergent table shape which is reversed from Go. it switches the dimension order in the given table, for all columns that are float 2D or 4D columns -- assumes these are layer patterns and names dimensions accordingly.

func ReshapeCppFile added in v1.0.0

func ReshapeCppFile(dt *etable.Table, fname, fixnm string)

ReshapeCppFile fixes C++ emergent table shape which is reversed from Go. It loads file from fname and saves to fixnm

Types

This section is empty.

Jump to

Keyboard shortcuts

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