Skip to content

mdcfrancis/gomnist1d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replication of the MNIST1D dataset in 100% GO.

A 100% golang implementation of the MNIST1D dataset. https://github.com/greydanus/mnist1d

the test found in data/loader_test.go : TestLoadMNISTImageFileMatches loads the orginal pickle file (converted to JSON) and compares with the go generated version. These match including supporting the random seeds.

Usage

package main

include (
    "fmt"
    "github.com/mdcfrancis/mnist1d"
)

func main() {
    m := mnist1d.NewDefault()

    ds := m.MakeDataset()
    for i, x := range m.Templates.X {
        fmt.Println("Template", i)
        fmt.Println(mnist1d.ShowAsImage(x))
    }
	
    for i := 0; i < 2; i++ {
        fmt.Println(ds.y[i])
        fmt.Println(mnist1d.ShowAsImage(ds.x[i]))
        fmt.Println(ds.x[i])
    }
}

The code attempts to follow closely the code in the original repository so at times looks less 'go like'.

References

Data converted from the original repository pickle file

About

Recreate the mnist1d dataset in pure go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages