pub fn optimize_tensor<B: Backend>(
log_likelihood: Tensor<B, 2>,
log_counts: Tensor<B, 1>,
alpha0: Tensor<B, 1>,
options: &OptimizerOpts,
) -> Result<(Tensor<B, 1>, Tensor<B, 2>), Box<dyn Error>>Expand description
Run on Tensor inputs
Preferred function when efficiency is required but you don’t want to call optimizer directly.
burn Backend must be given as the generic <B: Backend>.
§Inputs
log_likelihood: column-majorn_cols x n_rowslog-likelihood matrix.log_counts:n_rowsvector of natural logarithms of the weights forlog_likelihoodrows.alpha0:n_colsvector of prior counts for the Dirichlet model.options: OptimizerOpts.
§Outputs:
thetas:n_colsvector of inferred mixing proportions.gamma_Z: flattenedn_cols x n_rowscolumn-major matrix containing inferred probabilities that the rowiwas generated from clusterj.