Model.debug(point=None, fn='logp', verbose=False)[source]#

Debug model function at point.

The method will evaluate the fn for each variable at a time. When an evaluation fails or produces a non-finite value we print:

  1. The graph of the parameters

  2. The value of the parameters (if those can be evaluated)

  3. The output of fn (if it can be evaluated)

This function should help to quickly narrow down invalid parametrizations.

pointPoint, optional

Point at which model function should be evaluated

fnstr, default “logp”

Function to be used for debugging. Can be one of [logp, dlogp, random].

verbosebool, default False

Whether to show a more verbose PyTensor output when function cannot be evaluated