Skip to main content

Forge

@hotg-ai/forge / Exports / Forge

Class: Forge

A wrapper around a Rune that has been retrieved from elsewhere.

You probably don't want to use this directly.

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• Private new Forge(evaluate, telemetry)

Parameters​

NameType
evaluateEvaluate
telemetryTelemetryBackend

Properties​

evaluate​

• Private evaluate: Evaluate


telemetry​

• Private telemetry: TelemetryBackend

Methods​

predict​

â–¸ predict(inputs): OutputValue[]

Evaluate a Rune.

Parameters​

NameTypeDescription
inputsInputs | ReadInputA function which will be invoked when loading each input, or an instance of the Inputs convenience type.

Returns​

OutputValue[]

The tensors generated by the Rune.


load​

â–¸ Static load(parameters, backends, signal?): Promise<Forge>

Parameters​

NameType
parametersParameters
backendsRecord<string, LoadFunc>
signal?AbortSignal

Returns​

Promise<Forge>