tensorflow-opgen-0.1.0.0: Code generation for TensorFlow operations.

Safe HaskellNone
LanguageHaskell2010

TensorFlow.OpGen

Description

Rendering of TensorFlow operations as Haskell functions.

The basic type signature generated for each op is:

{constraints} => {mandatory attrs} -> {input tensors} -> {output tensors}

where:

  • {mandatory attrs} is of the form A_1 -> ... -> A_N, where each A is an op attribute that doesn't have a default and can't be inferred from other inputs.
  • {constraints} restrict the type parameters of the input and output tensors (for example: TensorType or OneOf).
  • {input tensors} is of the form T_1 -> ... -> T_N, where each T is of the form Tensor Ref a, Tensor v a or ResourceHandle a (or a list of one of those types), and a is either a concrete type or a (constrained) type variable.
  • {output tensors} is of the form (T_1,...,T_N) for "pure" ops, and Build (T_1,...,T_N) for "stateful" ops. An op is considered "stateful" if it takes a Tensor Ref or ResourceHandle as input, or if it's explicitly marked "Stateful" in its REGISTER_OP definition. (If there are no outputs, it is either ControlNode or Build ControlNode.)

Documentation