Builds InputPlaceHolders for MLComponent.

//@input vec2 inputSize = {64, 64}
//@input string inputName = "input"

var inputChannels = 3;

var inputBuilder = MachineLearning.createInputBuilder();
inputBuilder.setName(script.inputName);
inputBuilder.setShape(new vec3(script.inputSize.x, script.inputSize.y, inputChannels));

var inputPlaceholder = inputBuilder.build();
interface InputBuilder {
    build(): InputPlaceholder;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    setInputTexture(texture: Texture): InputBuilder;
    setName(name: string): InputBuilder;
    setSampler(sampler: Sampler): InputBuilder;
    setShape(shape: vec3): InputBuilder;
    setTransformer(transformer: Transformer): InputBuilder;
}

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

  • Sets the name of the InputPlaceholder to be built.

    Parameters

    • name: string

    Returns InputBuilder