DiriNet: A network to estimate the spatial and spectral degradation functions