In this study, we derive the heat flux formula for the Allegro model, one of machine-learning interatomic potentials using the equivariant deep neural network, to calculate lattice thermal conductivity using the homogeneous non-equilibrium molecular dynamics (HNEMD) method based on the Green-Kubo formula. Allegro can construct more advanced atomic descriptors than conventional ones, and can be applied to multicomponent and large-scale systems, providing a significant advantage in estimating the thermal conductivity of anharmonic materials, such as thermoelectric materials. In addition, the spectral heat current (SHC) method, recently developed for the HNEMD framework (HNEMD-SHC), allows the calculation of not only the total thermal conductivity but also its frequency components. The verification of the heat flux and the demonstration of HNEMD-SHC method are performed for the extremely anharmonic low-temperature phase of Ag2Se.