added read_weights to initialize weights and biases from a file