fromTensorflowAsync static method

Future<Net> fromTensorflowAsync(
  1. String path, {
  2. String config = "",
})

Implementation

static Future<Net> fromTensorflowAsync(String path, {String config = ""}) async {
  final cpath = path.toNativeUtf8().cast<ffi.Char>();
  final cconf = config.toNativeUtf8().cast<ffi.Char>();
  final rval = await cvRunAsync<Net>(
      (callback) => cffi.Net_ReadNetFromTensorflow_Async(cpath, cconf, callback), (c, p) {
    return c.complete(Net.fromPointer(p.cast<cvg.Net>()));
  });
  calloc.free(cpath);
  calloc.free(cconf);

  return rval;
}