torch.tx.gradAll
function gradAll(pattern: string, variables: string[]): Record<string, string>Compute multiple symbolic derivatives at once.
Parameters
patternstring- The expression pattern to differentiate
variablesstring[]- Array of variable names to differentiate with respect to
Returns
Record<string, string>– Object mapping variable names to their derivative patternsExamples
gradAll('x * y + z', ['x', 'y', 'z'])
// Returns: { x: 'y', y: 'x', z: '1' }