/// <summary> /// Creates a TensorsInfo instance. /// </summary> /// <feature>http://tizen.org/feature/machine_learning.inference</feature> /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception> /// <since_tizen> 6 </since_tizen> public TensorsInfo() { NNStreamer.CheckNNStreamerSupport(); Log.Info(NNStreamer.TAG, "TensorsInfo is created"); _infoList = new List <TensorInfo>(); }
/// <summary> /// Creates a TensorsData instance based on informations of TensorsInfo /// </summary> /// <returns>TensorsData instance</returns> /// <feature>http://tizen.org/feature/machine_learning.inference</feature> /// <exception cref="ArgumentException">Thrown when the method failed due to TensorsInfo's information is invalid.</exception> /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception> /// <since_tizen> 6 </since_tizen> public TensorsData GetTensorsData() { IntPtr tensorsData_h; TensorsData retTensorData; NNStreamerError ret = NNStreamerError.None; if (_handle == IntPtr.Zero) { Log.Info(NNStreamer.TAG, "_handle is IntPtr.Zero\n" + " GetTensorsInfoHandle() is called"); GetTensorsInfoHandle(); } ret = Interop.Util.CreateTensorsData(_handle, out tensorsData_h); NNStreamer.CheckException(ret, "unable to create the tensorsData object"); Log.Info(NNStreamer.TAG, "success to CreateTensorsData()\n"); retTensorData = TensorsData.CreateFromNativeHandle(tensorsData_h); return(retTensorData); }
/// <summary> /// Creates a TensorsInfo instance. /// </summary> /// <since_tizen> 6 </since_tizen> public TensorsInfo() { Log.Info(NNStreamer.TAG, "TensorsInfo is created"); _infoList = new List <TensorInfo>(); }