Spatiotemporal nonlinear interactions in multimode fibers are of interest for beam shaping and frequency conversion by exploiting the nonlinear interaction of different pump modes from quasi-continuous wave to ultrashort pulses centered around visible to infrared pump wavelengths. The nonlinear effects in multi-mode fibers depend strongly on the excitation condition; however, relatively little work has been reported on this subject. Here, we present a machine learning approach to learn and control nonlinear frequency conversion inside multimode fibers. We experimentally show that the spectrum of the light at the output of the fiber can be tailored by a trained deep neural network. The network was trained with experimental data to learn the relation between the input spatial beam profile of the pump pulse and the spectrum of the light at the output of the multimode fiber. For a user-defined target spectrum, the network computes the spatial beam profile to be applied at the input of the fiber. The physical processes involved in the creation of new optical frequencies are cascaded stimulated Raman scattering as well as supercontinuum generation. We show experimentally that these processes are very sensitive to the spatial shape of the excitation and that a deep neural network is able to learn the relation between the spatial excitation at the input and the spectrum at its output. The method is limited to spectral shapes within the achievable nonlinear effects supported by the test setup, but the demonstrated method can be implemented to learn and control other spatiotemporal nonlinear effects.