Deep and shallow architecture of multilayer neural networks