added ability to get weights of MLP