Improving Deterministic Uncertainty Estimation in Deep Learning for Classification and Regression