LFI-CAM is a novel neural network architecture that performs image classification and visual explanation in an end-to-end manner. It uses a Feature Importance Network to learn feature importance rather than directly generating an attention map, resulting in more reliable and consistent explanations. Experiments show LFI-CAM matches or exceeds baseline models on classification accuracy while generating higher quality attention maps.