fromTensorflowBytesAsync static method

Future<Net> fromTensorflowBytesAsync(
  1. Uint8List bufferModel, {
  2. Uint8List? bufferConfig,
})

Implementation

static Future<Net> fromTensorflowBytesAsync(Uint8List bufferModel, {Uint8List? bufferConfig}) async {
  bufferConfig ??= Uint8List(0);
  final bufM = VecUChar.fromList(bufferModel);
  final bufC = VecUChar.fromList(bufferConfig);
  final rval = await cvRunAsync<Net>(
      (callback) => cffi.Net_ReadNetFromTensorflowBytes_Async(bufM.ref, bufC.ref, callback), (c, p) {
    return c.complete(Net.fromPointer(p.cast<cvg.Net>()));
  });
  return rval;
}