Source-channel coding for machine learning