jax.experimental.checkify.Error#

class jax.experimental.checkify.Error(_pred: 'dict[ErrorEffect, Bool]', _code: 'dict[ErrorEffect, Int]', _metadata: 'dict[Int, PyTreeDef]', _payload: 'dict[ErrorEffect, Payload]')[source]#
參數:
  • _pred (dict[ErrorEffect, Bool])

  • _code (dict[ErrorEffect, Int])

  • _metadata (dict[Int, PyTreeDef])

  • _payload (dict[ErrorEffect, Payload])

__init__(_pred, _code, _metadata, _payload)#
參數:
  • _pred (dict[ErrorEffect, Bool])

  • _code (dict[ErrorEffect, Int])

  • _metadata (dict[Int, PyTreeDef])

  • _payload (dict[ErrorEffect, Payload])

返回類型:

None

方法

__init__(_pred, _code, _metadata, _payload)

get()

如果發生錯誤,則返回錯誤訊息;如果沒有錯誤發生,則返回 None。

get_exception()

如果發生錯誤,則返回 Python 例外;如果沒有錯誤發生,則返回 None。

throw()

tree_flatten()

tree_unflatten(metadata, data)