Net.fromOnnx constructor

Net.fromOnnx(
  1. String path
)

Implementation

factory Net.fromOnnx(String path) {
  return using<Net>((arena) {
    final p = calloc<cvg.Net>();
    final cpath = path.toNativeUtf8(allocator: arena).cast<ffi.Char>();
    cvRun(() => cffi.Net_ReadNetFromONNX(cpath, p));
    final net = Net._(p);
    return net;
  });
}