Out-of-Distribution Representation Learning for Time Series Classification