yobx.sklearn.neural_network.bernoulli_rbm#
- yobx.sklearn.neural_network.bernoulli_rbm.sklearn_bernoulli_rbm(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: BernoulliRBM, X: str, name: str = 'bernoulli_rbm') str[source]#
Converts a
sklearn.neural_network.BernoulliRBMinto ONNX.The transform computes the probability that each hidden unit is activated given the visible input:
P(h=1|v) = sigmoid(v @ W.T + h_bias)
where
Wiscomponents_of shape(n_components, n_features)andh_biasisintercept_hidden_of shape(n_components,).Graph structure:
X ──MatMul(components_.T)──Add(intercept_hidden_)──Sigmoid──► hidden
- Parameters:
g – the graph builder to add nodes to
sts – shapes defined by scikit-learn
outputs – desired output names (hidden probabilities)
estimator – a fitted
BernoulliRBMX – input tensor name
name – prefix for added node names
- Returns:
output tensor name for the hidden unit probabilities