Changed arguments to multi_layer so that $2 becomes the layer types for the SdA.  $1 still the output dimension