Documentation ¶
Index ¶
- type INeuralNet
- type TNeuralNetImpl
- func (z *TNeuralNetImpl) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *TNeuralNetImpl) EncodeMsg(en *msgp.Writer) (err error)
- func (p *TNeuralNetImpl) GetDSyn0(i int32) *TVector
- func (p *TNeuralNetImpl) GetSyn0(i int32) *TVector
- func (p *TNeuralNetImpl) GetSyn1(i int32) *TVector
- func (p *TNeuralNetImpl) GetSyn1Neg(i int32) *TVector
- func (z *TNeuralNetImpl) MarshalMsg(b []byte) (o []byte, err error)
- func (z *TNeuralNetImpl) Msgsize() (s int)
- func (p *TNeuralNetImpl) NewDSyn0() *TVector
- func (z *TNeuralNetImpl) UnmarshalMsg(bts []byte) (o []byte, err error)
- type TVector
- func (p TVector) Add(a TVector)
- func (z *TVector) DecodeMsg(dc *msgp.Reader) (err error)
- func (p TVector) Divide(a float32)
- func (p TVector) Dot(a TVector) (f float64)
- func (z TVector) EncodeMsg(en *msgp.Writer) (err error)
- func (z TVector) MarshalMsg(b []byte) (o []byte, err error)
- func (z TVector) Msgsize() (s int)
- func (p TVector) Multiply(a float64)
- func (p TVector) Reset()
- func (z *TVector) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type INeuralNet ¶
type INeuralNet interface { GetSyn0(i int32) *TVector GetDSyn0(i int32) *TVector NewDSyn0() *TVector GetSyn1(i int32) *TVector GetSyn1Neg(i int32) *TVector msgp.Encodable msgp.Decodable msgp.Marshaler msgp.Unmarshaler msgp.Sizer }
func NewNN ¶
func NewNN(docSize, wordSize, dim int, useHS, useNEG bool) INeuralNet
type TNeuralNetImpl ¶
type TNeuralNetImpl struct { Syn0 []TVector //V(i) Dsyn0 []TVector //D(i) Syn1 []TVector //for HS Syn1neg []TVector //for NEG }
func (*TNeuralNetImpl) DecodeMsg ¶
func (z *TNeuralNetImpl) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*TNeuralNetImpl) EncodeMsg ¶
func (z *TNeuralNetImpl) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*TNeuralNetImpl) GetDSyn0 ¶
func (p *TNeuralNetImpl) GetDSyn0(i int32) *TVector
func (*TNeuralNetImpl) GetSyn0 ¶
func (p *TNeuralNetImpl) GetSyn0(i int32) *TVector
func (*TNeuralNetImpl) GetSyn1 ¶
func (p *TNeuralNetImpl) GetSyn1(i int32) *TVector
func (*TNeuralNetImpl) GetSyn1Neg ¶
func (p *TNeuralNetImpl) GetSyn1Neg(i int32) *TVector
func (*TNeuralNetImpl) MarshalMsg ¶
func (z *TNeuralNetImpl) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*TNeuralNetImpl) Msgsize ¶
func (z *TNeuralNetImpl) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*TNeuralNetImpl) NewDSyn0 ¶
func (p *TNeuralNetImpl) NewDSyn0() *TVector
func (*TNeuralNetImpl) UnmarshalMsg ¶
func (z *TNeuralNetImpl) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type TVector ¶
type TVector []float32
func (TVector) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.