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]')[源代码][源代码]#
参数:
  • _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)