Keyword: Graph

The graph block defines the training graph for the training engine. Only one graph declaration is allowed per Inkling program.

A valid training graph includes:

  • InputType: the input type provided to the AI during at the end of a training iteration.
  • OutputType: the output type provided by the AI at the end of a training iteration (optional).
  • one or more concept declarations. Each concept has one or more inputs, which can be the graph input or the outputs of other concepts. No cycles are allowed.
  • output <ConceptName>: an indication of which concept represents the top-level training output, also known as the output concept. Optional in graphs with only one concept.
graph (input: InputType): OutputType {
  # Concept declarations omitted

  output MyConcept
}

Important

The output clause must refer to one of the declared concepts.

When OutputType is provided, the Inkling compiler verifies that the specified type matches that of the output concept. If OutputType is omitted, the Inkling compiler determines the correct type based on the type of the output concept.