torch.tx.CompiledPattern
export interface CompiledPattern {
/** The original pattern string */
pattern: string;
/** Variable names extracted from the pattern */
variables: string[];
/** Evaluate the pattern with given tensors */
run(tensors: Record<string, TensorOrNumber>): AnyTensor;
}pattern(string)- – The original pattern string
variables(string[])- – Variable names extracted from the pattern
run((tensors: Record<string, TensorOrNumber>) => AnyTensor)- – Evaluate the pattern with given tensors
A compiled pattern that can be evaluated with tensors.