Future gas turbine engines require improved understanding of the heat transfer between compressor discs and air in compressor cavities under transient operating conditions. Calculation of transient heat fluxes from temperature measurements on compressor discs is a typical ill-posed inverse problem where small uncertainties of measurements can lead to large uncertainties of the calculated fluxes. This paper develops a Bayesian model for the heat flux to reduce the adverse nature of the problem by using a Gaussian prior distribution with Matérn covariance. To efficiently find the maximum a posterior (MAP), a neural network was used to solve the heat equation for compressor discs for any choice of parameters, allowing fast evaluation of the solution to the forward model for any heat flux of interest. The power of the Bayesian model is first demonstrated using numerically-simulated data. Subsequently, the model is used to calculate fluxes from measurements of transient temperature collected from the Compressor Cavity Rig at the University of Bath. The fluxes for four transient cycles were calculated and the results show that, at low rotational Reynolds number, the flow and the heat transfer in the closed cavity were initially dominated by buoyancy effects and then became stratified. At the highest Rotational Reynolds number, buoyancy-induced flow dominated the entirety of the transient process due to significant frictional heating at the periphery of the rig. The calculated fluxes present evidence for future theoretical and computational modelling of transient disc heat transfer, and the Bayesian model provides guidance for transient temperature data analysis.