First-order reversal curve (FORC) diagrams are a standard rock magnetic tool for analyzing bulk magnetic hysteresis behaviors, which are used to estimate the magnetic mineralogies and magnetic domain states of grains within natural materials. However, the interpretation of FORC distributions is challenging due to complex domain-state responses, which introduce well-documented uncertainties and subjectivity. Here, we propose a neural network algorithm (FORCINN) to invert the size and aspect ratio distribution from measured FORC data. We trained and tested the FORCINN model using a dataset of synthetic numerical FORCs for single magnetite grains with various grain-sizes (45-400 nm) and aspect ratios (oblate and prolate grains). In addition to successfully testing FORCINN against synthetic datasets, we also tested FORCINN against FORC data measured on natural samples with accurately determined grain-size and aspect ratio distributions. FORCINN was found to provide good estimates of the grain-size distributions for basalt samples and marine sediments.