Transmuter.UnknownValueError exception (transmuter v2.0.0)

Copy Markdown View Source

Raised when an operator needs the value of a tensor that is only known when the model runs.

Examples include the limit of a Range, the input of a NonZero, the condition of an If, and the scores of a NonMaxSuppression.

Transmuter catches this error during compilation and creates a graph break at the operator. The break operator runs eagerly on the real values, and compilation continues after it with the shapes the values decide.

If Transmuter cannot handle the break, it re-raises the error. To fix it:

Fields

  • :value - the name of the tensor whose value was needed
  • :op_type - the operator type that needed the value
  • :node - the node name in the graph, or nil when not available
  • :expr - the id of the traced expression whose value was needed, or nil. Transmuter.compile/3 finds the input of the node that it is.