I'm not quite sure on the use-cases here. When would the user pass `model`? Is that for if they have a pre-built model. In that case, it seems to me that `network` and `model` are mutually exclusive, and we should assert that.

It might be good to add a docstring to this function.