Machine Learning for Pion Identification and Energy Calibration with the ATLAS Detector