torch.tx.LazyExpression.execute
lazyExpression.execute(additionalVars?: Record<string, TensorOrNumber>, options?: LazyExecuteOptions): AnyTensorExecute the expression with current bindings.
If additional variables are provided, they are merged with existing bindings. All variables must be bound before execution.
Parameters
additionalVarsRecord<string, TensorOrNumber>optional- Optional additional variables to bind before execution
optionsLazyExecuteOptionsoptional- Execution options
Returns
AnyTensor– The evaluated tensor resultExamples
const expr = $.lazy('x @ w + b');
// Execute with all variables at once
const result1 = expr.execute({ x, w, b });
// Or bind incrementally then execute
const bound = expr.with({ w, b });
const result2 = bound.execute({ x });