as_params function

Convert TensorFlow tensors to distribution parameters recursively