ramsey-devs / ramsey

Probabilistic deep learning using JAX
https://ramsey.rtfd.io
Apache License 2.0
13 stars 3 forks source link

How to dispatch? #13

Closed dirmeier closed 1 year ago

dirmeier commented 2 years ago

Not sure which is better

__call__(self, method="predict", **kwargs):

or dispatch based on number of args:

__call__(self, x **kwargs):
  if "y" in kwargs:
      return self._this_method(x, kwargs["y"]):
  return return self._that_method(x)   

Check what Haiku/Flax/.. recommend.