End-to-end Learning for Early Classification of Time Series