# Tag: #machine-learning

Automatic differentiation with dual numbers

Differentiation asks: how does tweaking the inputs change the output? To accurately differentiate an arbitrary function, perhaps the simplest way is using “dual numbers”. 2024-04-02

Tell the LLM the business context

Tell LLM why its task is needed and how the output will be used. You’ll get better results, but programmers often don’t do this because it’s anti-modular. 2024-03-30

Auto-summarizing my blog posts

Summarizing my blog posts using Claude Haiku. The benefits of providing business context. The benefits of iterating. 2024-03-26

Time series: an interactive tutorial

2022-09-08

A/B Testing: an interactive look at Thompson sampling

2022-07-15

Imputation: an interactive tutorial

2022-01-17

How to export a model for TensorFlow.js

Exporting a TensorFlow model, converting it to the TensorFlow.js format, and running it in the browser with interactive input. 2021-03-09

TensorFlow 2 ‘hello world’

A TensorFlow 2 program that learns the cost per gram of chocolate by training a linear model on example chocolate bar weights and prices. 2021-02-17

What is a Single-Shot Multibox Detector?

A neural network architecture that can output bounding boxes. It uses a fixed set of “anchor points” and predicts offsets and sizes for each anchor. 2021-02-16

How to run a pre-trained model in TensorFlow.js

Load the model, convert the input to a tensor, preprocess the tensor to match the model’s expected format, run inference with

`.predict()`

, and decode the prediction tensor. 2021-02-15A head in a box with BlazeFace

A method for calculating a bounding circle around a head, using facial landmarks from BlazeFace. Plus a live demo that you can run on your own face. 2020-10-12

Head tracking with BlazeFace

A method for calculating a bounding circle around a head, using facial landmarks from BlazeFace. Plus a live demo that you can run on your own face. 2020-10-11

How to self-host a TensorFlow.js model

Involves downloading the model manifest file and associated binary weight files, to avoid downloading large models every application launch. 2020-10-07

How to make a floating head

Creating a “floating head” effect using WebGL and the BodyPix machine learning model to segment the face from a webcam feed. 2020-10-06

Using BodyPix segmentation in a WebGL shader

A WebGL shader that uses BodyPix segmentation to set the alpha channel. 2020-09-24

BlazeFace hello world

A demo that uses the BlazeFace model from TensorFlow.js to detect faces in a webcam stream, and draws the detected landmarks on the video. 2020-09-21

How to write ‘hello world’ in TensorFlow

Two ways to calculate the cost per gram of chocolate: one without machine learning, and another using TensorFlow to learns a linear model. 2017-04-23

What is the simplest neural network? One neuron

A neural network with one neuron that classifies binary-encoded natural numbers. We can decide whether the number is even, or whether it’s greater/less than 5. 2017-04-22

All content copyright James Fisher.