Remove the custom scaler and use scikit-learn [MinMaxScaler](https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html) with (-1, 1) instead. `from sklearn.preprocessing import MinMaxScaler`