jax.experimental.checkify.Error

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)

获取()

如果发生错误,则返回错误消息;如果未发生错误,则返回 None。

获取异常()

如果发生错误,则返回 Python 异常;如果未发生错误,则返回 None。

抛出()

树形扁平化()

tree_unflatten(metadata, data)