Learning Device Models with Recurrent Neural Networks