Documentation ¶
Index ¶
- Constants
- Variables
- type Network
- func (net *Network) Cost(_expect ...float64) (float64, error)
- func (net *Network) Guess(_input ...float64) ([]float64, error)
- func (net *Network) MarshalJSON() ([]byte, error)
- func (net Network) Output() ([]float64, error)
- func (net *Network) ReadFrom(r io.Reader) (int64, error)
- func (net *Network) Train(_input []float64, _expect []float64) error
- func (net *Network) UnmarshalJSON(in []byte) error
- func (net *Network) WriteTo(w io.Writer) (int64, error)
Constants ¶
const LearningRate = 1
const MaxLayerCount = 255
Variables ¶
var ErrEmptyLayer = errors.New("cannot create an empty layer")
ErrEmptyLayer is raised when there is an empty layer
var ErrMissingInput = errors.New("missing input data")
ErrMissingInput is raised when there is missing inputs for a network
var ErrMissingLayers = errors.New("a network needs at least 2 layers")
ErrMissingLayers is raised when there is less than 3 layers
var ErrMissingOutput = errors.New("missing output data")
ErrMissingOutput is raised when there is missing outputs for a network
var ErrNoState = errors.New("you must process a forward pass beforehand")
ErrNoState is raised when trying to apply a stateful process on an empty network (no forward pass applied)
var ErrTooMuchLayers = errors.New("too much layers")
ErrTooMuchLayers is raised when the max number of layers is reached
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func Empty ¶
Empty creates a new network where each argument is the number of neurons of a layer each param represents a layer, including input/output
func (*Network) MarshalJSON ¶
MarshallJSON implements the json.Marshaler interface
func (*Network) Train ¶
Train uses the trained network to train with the _input and tries to learn to guess the _expect instead
func (*Network) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface