ANN_MLP.loadFromString constructor

ANN_MLP.loadFromString(
  1. String strModel, {
  2. String objname = '',
})

Loads a model from the content of a file saved with save (e.g. a Flutter asset).

objname is the name of the model node, the first top-level node when empty.

Implementation

factory ANN_MLP.loadFromString(String strModel, {String objname = ''}) => using(
  (arena) => ANN_MLP._make(
    (p) => cml.cv_ml_ANN_MLP_loadFromString(
      strModel.toNativeUtf8(allocator: arena).cast(),
      objname.toNativeUtf8(allocator: arena).cast(),
      p,
    ),
  ),
);