Builds OutputPlaceholders for MLComponent.

//@input vec2 outputSize = {1, 1}
//@input string outputName = "probs"

var outputChannels = 200;

var outputBuilder = MachineLearning.createOutputBuilder();
outputBuilder.setName(script.outputName);
outputBuilder.setShape(new vec3(script.outputSize.x, script.outputSize.y, outputChannels));
outputBuilder.setOutputMode(MachineLearning.OutputMode.Data);
var outputPlaceholder = outputBuilder.build();
interface OutputBuilder {
    build(): OutputPlaceholder;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    setName(name: string): OutputBuilder;
    setOutputMode(outputMode: OutputMode): OutputBuilder;
    setTransformer(transformer: Transformer): OutputBuilder;
}

Hierarchy (view full)

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean