Skip to content

Instantly share code, notes, and snippets.

@lobrien
lobrien / led_segs.py
Last active July 15, 2024 19:48
Keras neural net that recognizes number in a 7-segment display
import numpy as np
from keras.models import Sequential
from keras.layers.core import Activation, Dense
from keras.optimizers import SGD
# Trains a neural net that recognizes the digit displayed by a 7-segment LED:
# "Lit segments" are indexed as:
# -- 0 --
# | |
# 1 2