During a solar flare, it is believed that reconnection takes place in the corona followed by fast energy transport to the chromosphere. The resulting intense heating strongly disturbs the chromospheric structure and induces complex radiation hydrodynamic effects. Interpreting the physics of the flaring solar atmosphere is one of the most challenging tasks in solar physics. We present a novel deep learning approach, an invertible neural network, to understanding the chromospheric physics of a flaring solar atmosphere via the inversion of observed solar line profiles in Hα and Ca II λ8542. The network is trained using flare simulations from the 1D radiation hydrodynamic code RADYN as the expected atmosphere and line profile. This model is then applied to whole images from an observation of an M1.1 solar flare taken with the Swedish 1 m Solar Telescope/CRisp Imaging SpectroPolarimeter instrument. The inverted atmospheres obtained from observations provide physical information on the electron number density, temperature and bulk velocity flow of the plasma throughout the solar atmosphere ranging in height from 0 to 10 Mm. Our method can invert a 1k x 1k field-of-view in approximately 30 minutes and we show results from the whole image inversions and error calculations on the inversions. Furthermore, we delve into the mammoth task of analysing the wealth of data we have accumulated through these inversions. The magnetic Rayleigh–Taylor instability is a fundamental MHD instability and recent observations show that this instability develops in the solar prominences. We analyze the observations from Solar Dynamic Observatory/Atmospheric Imaging Assembly of a MRT unstable loop-like prominence. Initially, some small-scale perturbations are developed horizontally and vertically at the prominence-cavity interface. These perturbations are associated with the hot and low dense coronal plasma as compared to the surrounding prominence. The interface supports magneto-thermal convection process, which acts as a buoyancy to launch the hot and low denser plumes (P1 and P2) propagating with the speed of 35–46 km s-1 in the overlying prominence. The self-similar plume formation initially shows the growth of a linear MRT-unstable plume (P1), and thereafter the evolution of a nonlinear single-mode MRT-unstable second plume (P2). A differential emission measure analysis shows that plumes are less denser and hotter than the prominence. We have estimated the observational growth rate for both the plumes as 1.32±0.29×10−3 s−1 and 1.48±0.29×10^−3 s^−1, respectively, which are comparable to the estimated theoretical growth rate (1.95×10^−3 s^−1). Later, these MRT unstable plumes get stabilize via formation of rolled (vortex-like) plasma structures at the prominence-cavity interface in the downfalling plasma. These rolled-plasma structures depict Kelvin-Helmholtz instability, which corresponds to the nonlinear phase of MRT instability. However, even after the full development of MRT instability, the overlying prominence is not erupted. Later, a Rayleigh-Taylor unstable tangled plasma thread is evident in the rising segment of this prominence. This tangled thread is subjected to the compression between eruption site and overlying dense prominence at the interface. This compression initiates strong shear at the prominence-cavity interface and causes Kelvin-Helmholtz vortex-like structures. Due to this shear motion, the plasma downfall is occurred at the right part of the prominence–cavity boundary. It triggers the characteristic KH unstable vortices and MRT-unstable plasma bubbles propagating at different speeds and merging with each other. The shear motion and lateral plasma downfall may initiate hybrid KH-RT instability there.