Documentation ¶
Overview ¶
Package weights provides weight loading routines that parse weight files into a temporary structure that can then be used to set weight values in the network. This is much simpler and allows use of the standard Go json Unmarshal routines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Prec = 4
Prec is the precision for weight output in text formats. The default is aggressive for Leabra models. May need to increase for other models.
Functions ¶
This section is empty.
Types ¶
type Layer ¶
type Layer struct { Layer string MetaData map[string]string // for optional layer-level params, metadata such as ActMAvg, ActPAvg Units map[string][]float32 // for unit-level adapting parameters Paths []Path // receiving pathways }
Layer is temp structure for holding decoded weights, one for each layer
func LayReadJSON ¶
LayReadJSON reads weights for layer in a JSON format into Layer structure
func (*Layer) SetMetaData ¶
type Network ¶
type Network struct { Network string MetaData map[string]string // used for optional network-level params, metadata Layers []Layer }
Network is temp structure for holding decoded weights
func NetReadCpp ¶
NetReadCpp reads weights for entire network from old emergent C++ format
func NetReadJSON ¶
NetReadJSON reads weights for entire network in a JSON format into Network structure
func (*Network) SetMetaData ¶
type Path ¶
type Path struct { From string MetaData map[string]string // used for optional path-level params, metadata such as GScale MetaValues map[string][]float32 // optional values at the pathway level Rs []Recv }
Path is temp structure for holding decoded weights, one for each pathway
func PathReadJSON ¶
PathReadJSON reads weights for path in a JSON format into Path structure