Posted by u/Boliye
I implemented a VAE in Pure C for Minecraft Items
I wanted to share this project I recently made. Let me know what you guys think. I implemented a Convolutional Variational Autoencoder in C, no dependencies. I made this to learn how a more or less complex architecture is implemented from the lowest algorithmic level. The project implements everything from matmuls, to Adam and Xavier init, to CNN layers and the VAE training pipeline. I used OpenMP to parallelize the code on CPU. The code is, in my opinion, very readable and simple to understand. I prioritized simplicity over doing any complex optimizations. I used the Minecraft items dataset because the images are very low resolution (rgb 16x16) and I thought I could make some nice latent arithmetic. After the VAE was trained, I tested it by doing latent arithmetic. For example, I encoded the item iron\_chestplate into its latent representation, I got a latent representation for the concepts "diamond" and "iron" via averaging out the latents of all diamond and iron items, and finally decoded the latent "iron\_chestplate - iron + diamond", which generated an image of a diamond chestplate. Link: https://github.com/pmarinroig/c-vae
More from r/learnmachinelearning
TensorFlow isn't dead. It’s just becoming the COBOL of Machine Learning.
I keep seeing "Should I learn TensorFlow in 2026?" posts, and the answers are always "No, PyTorch won." But looking at...
I’m working on an animated series to visualize the math behind Machine Learning (Manim)
Hi everyone :) I have started working on a YouTube series called "The Hidden Geometry of Intelligence." It is a...
(End to End) 20 Machine Learning Project in Apache Spark
Hi Guys, I hope you are well. Free tutorial on Machine Learning Projects (End to End) in Apache Spark and Scala with...