tensorops_deriv

tensorops_deriv(*expansion_op_pairs, order, shared=None): 

LLM Docstring

Compute the derivative expansion of an arbitrary chain of tensor operations applied to several expansions.

Canonicalizes the alternating (expansion, op, expansion, ...) arguments, resolves any symbolic axis specifications, and propagates truncated expansions along the operation chain. Each intermediate expansion is evaluated once with the generalized binary product rule, preserving operand order and avoiding repeated prefix contractions across derivative assignments.

  • expansion_op_pairs: Sequence

    alternating expansions and operation specs

  • order: int | list[int]

    the derivative order(s)

  • shared: int | None

    number of shared leading batch axes

  • :returns: list

    the chained-operation derivative expansion


Feedback

Examples

Templates

Documentation