hotpot.seafood

module
v0.0.0-...-dbd0488 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: GPL-3.0

README

Hotpot Seafood

Hotpot::Seafood - data world opening

Example:
shell with cd command to repository root directory
Basic Neural Network / XOR: GOPATH=$(pwd) go run src/xor.go
Recurrent Neural Network / ADD: GOPATH=$(pwd) go run src/add.go
Convolutional Neural Network / MNIST: GOPATH=$(pwd) go run src/mnist.go

import nn "neuralnetwork"

func main () {
   nn.RandomSeed()
   n := nn.NewNeuralChain()
   n.AddLayer(nn.NewLayerLinear(1, 2, 16, 0.5 /*weight*/, 0 /* decay */, false /* use b */))
   n.AddLayer(nn.NewLayerActivation(1, 16, "sigmoid"))
   n.AddLayer(nn.NewLayerLinear(1, 16, 1, 0.5, 0, false))
   n.AddLayer(nn.NewLayerActivation(1, 1, "sigmoid"))

   input := nn.NewSimpleMatrix(1, 2)
   input.Data[0][0] = 0
   input.Data[0][1] = 1
   expect := nn.NewSimpleMatrix(1, 1)
   expect.Data[0][0] = 1

   n.Fit(input, expect, 0.1 /* learning rate */)
   // equals
   output := n.Predict(input)
   n.Learn(output, expect)
   n.Update(0.1)
}

Hidden Markov Model ref: jahmm

Baum-Welch Algorithm ref: wikipedia

Recurrent Nerual Network ref: iamtrask github blog

Neural Network ref: abll

Directories

Path Synopsis
learn
hmm
rnn
src

Jump to

Keyboard shortcuts

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