Neural network for low-memory IoT devices