DeepONet: Einstein Summation🔗
Interactive DeepONet Einsum Demo
Explore how torch.einsum('bp,bnp->bn', branch_out, trunk_out) combines branch and trunk network outputs step by step.
DeepONet Einsum Operation
DeepONet Forward Pass:
result = torch.einsum('bp,bnp->bn', branch_out, trunk_out)
This computes dot products between branch features and trunk features for each query point
Mathematical Operation:
result[b,n] = Σ(p=0 to P-1) branch[b,p] × trunk[b,n,p]
For each batch b and query point n, sum over all feature dimensions p
In DeepONet: Branch learns function representations, Trunk learns spatial/temporal coordinates.
Einsum combines them to predict function values at any query location.
DeepONet Architecture with Batching
Tensor Flow Visualization
Step-by-Step Computation
Branch Output Vectors [batch, p]
Trunk Feature Matrix [batch, n, p]
Final Result [batch, n]
Step-by-Step Computation Details