Synthesization and reconstruction of 3D faces by deep neural networks