Widely known as “green solvents,” ionic liquids (ILs) and deep eutectic solvents (DESs) have been used as substitutes for traditional organic solvents in separation science. To achieve better separations using ILs and DESs, this work aimed to predict the infinite dilution activity coefficients (IDACs) of molecular solutes in these solvents with the state-of-the-art factorization-machine-based neural network (DeepFM). DeepFM combines the benefits of factorization machines and deep neural networks to learn both low-order and high-order interactions among features. The IDAC prediction model was established with 52,372 experimental IDAC datapoints including 260 solvents (252 ILs and 8 DESs) and 112 molecular solutes collected at various temperatures from 288.15 to 428.15 K. Chemical information describing the ILs, DESs, and molecular solutes was included in the IDAC prediction model, including chemical functional groups, molecular weights, and Abraham solvation parameters. The IDAC prediction model showed an improved accuracy compared with alternative models; additionally, DESs were included in the IDAC prediction model for the first time. The model will reduce the energy and resources needed to optimize the selection of ILs and DESs for specific separations, which will promote the development of these green solvents for sustainable chemical processes.