Operator

public abstract @interface Operator

Annotation used by classes to make TensorFlow operations conveniently accessible via org.tensorflow.op.Ops.

An annotation processor (org.tensorflow.processor.OperatorProcessor) builds the Ops class by aggregating all classes annotated as @Operators. Each annotated class must have at least one public static factory method named create that accepts a Scope as its first argument. The processor then adds a convenience method in the Ops class. For example:

{@code

Public Methods

String
group()
Specify an optional group within the Ops class.
String
name()
Name for the wrapper method used in the Ops class.

Inherited Methods

Public Methods

public String group ()

Specify an optional group within the Ops class.

By default, an annotation processor will create convenience methods directly in the Ops class. An annotated operator may optionally choose to place the method within a group. For example:

{@code

public String name ()

Name for the wrapper method used in the Ops class.

By default, a processor derives the method name in the Ops class from the class name of the operator. This attribute allow you to provide a different name instead. For example:

{@code