tensorflow/tfjs ? reverse-engineered prompt

Reverse engineered prompt

Build me a JavaScript library for machine learning that works in the browser and in Node.js, with a simple way to train models, make predictions, and load existing TensorFlow and Keras models.

I want it to feel easy for someone building a web app, so include a low level API for tensors and math, a higher level layers API for common model building, and basic data loading and prep helpers. It should run fast in the browser using hardware acceleration when available, and still work with a plain CPU fallback so it’s reliable everywhere.

Please also add a small demo page or example that shows a simple model being trained and then used for inference, plus a clear README with setup and usage instructions. If you need to check current docs or best practices online, go ahead and do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab