Click or drag to resize
VariableDiscreteFromLogProbs Method
Microsoft Research
Creates a random int variable x where p(x=k) is proportional to exp(logProbs[k]), i.e. the softmax function of the logProbs.

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
public static Variable<int> DiscreteFromLogProbs(
	VariableArray<double> logProbs
)

Parameters

logProbs
Type: MicrosoftResearch.Infer.ModelsVariableArrayDouble
Arguments to the softmax.

Return Value

Type: VariableInt32
An integer random variable
See Also