persist

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpToFile

func DumpToFile(path string, dump *NetworkDump) error

DumpToFile writes a NetworkDump to file

func DumpToOnlineFile added in v0.2.5

func DumpToOnlineFile(path string, dump *OnlineDump) error

DumpToOnlineFile writes a NetworkDump to file

func FromDump

func FromDump(dump *NetworkDump) *neural.Network

FromDump creates a Network out of a NetworkDump

func FromFile

func FromFile(path string) (*neural.Network, error)

FromFile loads a NetworkDump from File and creates Network out of it

func FromOnlineDump added in v0.2.5

func FromOnlineDump(d *OnlineDump) *online.Online

FromOnlineDump creates a Online out of an OnlineDump

func OnlineFromFile added in v0.2.5

func OnlineFromFile(path string) (*online.Online, error)

FromOnlineFile loads a OnlineDump from File and creates Online out of it

func OnlineToFile added in v0.2.5

func OnlineToFile(path string, n *online.Online) error

ToOnlineFile takes an Online and creates an OnlineDump out of it and writes it to a file

func SetFromFile

func SetFromFile(path string) (*learn.Set, error)

SetFromFile reads a data set from a file

func SetToFile

func SetToFile(path string, set *learn.Set) error

SetToFile writes a set to a file

func ToFile

func ToFile(path string, n *neural.Network) error

ToFile takes a network and creats a NetworkDump out of it and writes it to a file

func ToOnlineFile added in v0.2.5

func ToOnlineFile(path string, n *online.Online) error

ToFile takes a network and creats a NetworkDump out of it and writes it to a file

Types

type NetworkDump

type NetworkDump struct {
	Enters    int
	Weights   Weights
	OutLabels map[string]string
}

NetworkDump is the json representation of the network stucture

func DumpFromFile

func DumpFromFile(path string) (*NetworkDump, error)

DrumpFromFile loads a NetworkDump from file

func ToDump

func ToDump(n *neural.Network) *NetworkDump

ToDump creates a NetworkDump out of a Network

type OnlineDump added in v0.2.5

type OnlineDump struct {
	NetworkInput   int
	NetworkLayer   []int
	NetworkOutput  int
	Data           *learn.Set
	Network        *NetworkDump
	LastEvaluation *evaluation.Evaluation
	Verbose        bool
	Usage          neural.NetworkType
	AddedPoints    int
	Config         *online.Config
}

OnlineDump is the json representation of the network stucture

func OnlineDumpFromFile added in v0.2.5

func OnlineDumpFromFile(path string) (*OnlineDump, error)

DrumpFromOnlineFile loads an OnlineDump from file

func ToOnlineDump added in v0.2.5

func ToOnlineDump(d *online.Online) *OnlineDump

ToOnlineDump creates a OnlineDump out of an Online

type Weights

type Weights [][][]float64

Weights is used to persist the weights of the network

Jump to

Keyboard shortcuts

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