Diffusion properties of bulk fluids have been predicted using empirical expressions and machine learning (ML) models, suggesting that predictions of diffusion also should be possible for fluids in confined environments. The ability to quickly and accurately predict diffusion in porous materials would enable new discoveries and spur development in relevant technologies such as separations, catalysis, batteries, and subsurface applications. In this work, we apply artificial neural network (ANN) models to predict the simulated self-diffusion coefficients of real liquids in both bulk and pore environments. The training data sets were generated from molecular dynamics (MD) simulations of Lennard-Jones particles representing a diverse set of 14 molecules ranging from ammonia to dodecane over a range of liquid pressures and temperatures. Planar, cylindrical, and hexagonal pore models consisted of walls composed of carbon atoms. Our simple model for these liquids was primarily used to generate ANN training data, but the simulated self-diffusion coefficients of bulk liquids show excellent agreement with experimental diffusion coefficients. ANN models based on simple descriptors accurately reproduced the MD diffusion data for both bulk and confined liquids, including the trend of increased mobility in large pores relative to the corresponding bulk liquid.