This work aims to employ machine-learning models, specifically neural networks, to predict the time evolution of the global surface roughness in a lattice model that represents a film growing on a d-dimensional substrate. We analyze the well-known ballistic deposition (BD) model for d=1, 2 since it presents strong corrections to the scaling, making it difficult to observe directly, via effective scaling exponents, its correspondence with the Kardar-Parisi-Zhang (KPZ) universality class. As an alternative to overcome this difficulty, we first intend to learn the time evolution of the global roughness for substrate sizes that are computationally viable to simulate. To test the learning, we apply two different methodologies for d = 1: the first one learns the Family-Vicsek scaling relation, and by doing the reverse transformation, we get the global roughness as a function of the time, and the second one learns the kinetic roughening directly from the time series data. For growth in d = 2 where applications arise and no exact KPZ scaling exponents are known, we apply the second methodology. However, we employ a more resilient learning model tailored for time series problems. Hence, the time required to generate the same amount of data, showing the evolution of global roughness, is reduced dramatically. Importantly, machine learning techniques capture the scaling corrections of the BD model, predicting an effective global roughness exponent, α, calculated from the learned data extracted from very large lateral sizes and times that cannot be simulated using lattice models. Our prediction is consistent with accurate estimates of the KPZ roughness exponent reported in the literature for d = 2.