A unified approach to transfer learning of deep neural networks with applications to speaker adaptation in automatic speech recognition