Oh, in that case I misunderstood the use case. 
That’s an interesting idea. I’m unfortunately not deeply familiar with sympy, but do you know, if the “parameters” have some kind of flags?
I assume we could use some parser to check for the “trainable flag” and create nn.Parameters out of them.
EDIT: I’m not sure, if the creation of the actual function would be easy. It seems we would need to have some mapping between sympy to PyTorch methods.