Skip to content

Heusini/zigHolyShit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A comglomerate of code to test Zig

The code in this repository was created to test the Zig programming language. It includes a small library for matrix multiplication and an implementation of a small perceptron neural network.

This code is tested and compiled with zig 0.14

The main can be run with different arguments to either train or visualize the neural networks results.

zig build run -Doptimize=ReleaseFast -- ml # training of the neural network. Expects the MNIST dataset at data/MNIST/
zig build run -Doptimize=ReleaseFast -- run_ml # uses mx1 and mx2 files as the weights for the two layers of the network. Visualizes the results of the ml with raylib
zig build run -Doptimize=ReleaseFast -- visualize # visualizes the MNIST dataset. Expects the MNIST dataset at data/MNIST/
zig build run -Doptimize=ReleaseFast -- mandelbrot # calculates mandelbrot image but no output yet

Interesting Code

  • In idx.zig is code to read the MNIST idx dataset files
  • The ml folder contains all the code for the neural network
  • The dot.zig has multiple implementations for matrix multiplication. From a simple basic implementation to versions that are threaded and taking advantage of caching. The ml code uses this matrix library
  • Some code to create a mandelbrot image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors