SR2IntermediateMean

Source: models/common/IntermediateMean.py

to = mean(from, dim=trailing_sub_batch_axis); reduces sub_batch_ndim by 1.

Mirrors C++ IntermediateMean<SR2>. Used in CP to average per-crystal cauchy stress into a mean over crystals (taylor-style homogenisation).

The reduces HIT parameter names the sub-batch label this reducer collapses (e.g. reduces = 'grain' for the CP polycrystal mean). The composed-model propagator uses it to track per-label structural state through the chain.

Inputs

frominput · SR2 · required

Input tensor to average

Outputs

tooutput · SR2 · required

Averaged tensor

Other options

reducesstr · required

Sub-batch label this reducer collapses.