You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to construct contract_expression with optional batch dimensions? Consider example: contract('...i,i->...', a, b)
Expression above could be used with different shapes of variable a. But If I construct contract_expression in the following way: contract_expression('...i,i->...', (1024, 16), (16,))
It would accept only 2-dimensional tensor as its first argument.
The text was updated successfully, but these errors were encountered:
You can supply arrays with different shapes but not ndim to a ContractExpression and they will be evaluated with the same contraction path - i.e. you could vary 1024, 16 etc. Or you could generate the path for one set of shapes and use it to generate many different contract expressions (though it might no longer be the best path for different sets of shapes!).
opt_einsum also works nicely with jax (which has an efficient version of numpy.vectorize):
Is it possible to construct
contract_expression
with optional batch dimensions? Consider example:contract('...i,i->...', a, b)
Expression above could be used with different shapes of variable
a
. But If I construct contract_expression in the following way:contract_expression('...i,i->...', (1024, 16), (16,))
It would accept only 2-dimensional tensor as its first argument.
The text was updated successfully, but these errors were encountered: