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)