A Neural Network-Based On-Device Learning Anomaly Detector for Edge Devices