A New Approach to Classifying Myocardial Infarction and Cardiomyopathy Using Deep Learning