Class SkipIfUniformAttribute
The result is uniform (or an exception would be thrown) whenever this parameter is uniform, hence the function call can be skipped.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors.Attributes
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class SkipIfUniformAttribute : Attribute
Remarks
Applies to message function parameters. This annotation is optional and allows the inference engine to skip unnecessary function calls, i.e. ones which would produce a uniform result or throw an exception. For LogAverageFactor and AverageLogFactor, SkipIfUniform means the result would be 0.
When applied to an array parameter, this attribute means the result is uniform (or an exception would be thrown) whenever all dependent elements in the array are uniform. For example:
f([AllExceptIndex,SkipIfUniform] Message[] array, int resultIndex)
f
depends on all elements other than resultIndex, and can be skipped if all of these are uniform.f
does not depend onarray[resultIndex]
and the uniformity of this element is ignored.