示例#1
0
 public static extern bool TF_TryEvaluateConstant(IntPtr graph, TF_Output output, IntPtr[] result, SafeStatusHandle status);
示例#2
0
 public static extern int TFE_OpGetOutputLength(SafeOpHandle op, string input_name, SafeStatusHandle status);
示例#3
0
 public static extern SafeContextHandle TFE_NewContext(SafeContextOptionsHandle opts, SafeStatusHandle status);
示例#4
0
 public static extern IntPtr TFE_TensorHandleBackingDeviceName(SafeTensorHandleHandle h, SafeStatusHandle status);
示例#5
0
 public static extern TF_AttrType TFE_OpNameGetAttrType(SafeContextHandle ctx, string op_or_function_name, string attr_name, ref byte is_list, SafeStatusHandle status);
示例#6
0
 public static extern IntPtr TFE_TensorHandleResolve(SafeTensorHandleHandle h, SafeStatusHandle status);
示例#7
0
 public static extern int TFE_TensorHandleDim(SafeTensorHandleHandle h, int dim, SafeStatusHandle status);
示例#8
0
 public static extern void TFE_ContextRemoveFunction(SafeContextHandle ctx, string name, SafeStatusHandle status);
示例#9
0
 /// <summary>
 /// Execute the operation defined by <paramref name="op"/> and return handles to computed
 /// tensors in <paramref name="retvals"/>.
 /// </summary>
 /// <remarks>
 /// Upon successful return, the first <paramref name="num_retvals"/> slots in <paramref name="retvals"/> will
 /// contain handle instances which the caller is responsible for disposing once they are no longer in use.
 /// </remarks>
 /// <param name="op"></param>
 /// <param name="retvals"></param>
 /// <param name="num_retvals"></param>
 /// <param name="status"></param>
 public static void TFE_Execute(SafeOpHandle op, SafeTensorHandleHandle[] retvals, out int num_retvals, SafeStatusHandle status)
 {
     unsafe
     {
         num_retvals = retvals?.Length ?? 0;
         var rawReturns = stackalloc IntPtr[num_retvals];
         TFE_Execute(op, rawReturns, ref num_retvals, status);
         for (var i = 0; i < num_retvals; i++)
         {
             // A handle is created for every return, even if rawReturns[i] is null. The resulting handle will be
             // non-null but invalid, which is the same behavior P/Invoke gives for non-array SafeHandle return
             // values.
             retvals[i] = new SafeTensorHandleHandle(rawReturns[i]);
         }
     }
 }
示例#10
0
 public static extern SafeImportGraphDefResultsHandle TF_GraphImportGraphDefWithResults(IntPtr graph, SafeBufferHandle graph_def, SafeImportGraphDefOptionsHandle options, SafeStatusHandle status);
示例#11
0
 public static extern unsafe ulong TF_StringDecode(byte *src, ulong src_len, byte **dst, ref ulong dst_len, SafeStatusHandle status);
示例#12
0
 public static extern unsafe void TF_GraphImportGraphDefWithReturnOutputs(IntPtr graph, SafeBufferHandle graph_def, SafeImportGraphDefOptionsHandle options, IntPtr return_outputs, int num_return_outputs, SafeStatusHandle status);
示例#13
0
 public static extern void TF_GraphGetTensorShape(IntPtr graph, TF_Output output, long[] dims, int num_dims, SafeStatusHandle status);
示例#14
0
 public static extern void TF_GraphGetOpDef(IntPtr graph, string op_name, SafeBufferHandle output_op_def, SafeStatusHandle status);
示例#15
0
 public static extern void TFE_OpAddInput(SafeOpHandle op, SafeTensorHandleHandle h, SafeStatusHandle status);
示例#16
0
 private static unsafe extern void TFE_Execute(SafeOpHandle op, IntPtr *retvals, ref int num_retvals, SafeStatusHandle status);
示例#17
0
 public static extern SafeTensorHandleHandle TFE_NewTensorHandle(IntPtr t, SafeStatusHandle status);
示例#18
0
 public static extern SafeOpHandle TFE_NewOp(SafeContextHandle ctx, string op_or_function_name, SafeStatusHandle status);
示例#19
0
 public static extern int TFE_TensorHandleNumDims(SafeTensorHandleHandle h, SafeStatusHandle status);
示例#20
0
 public static extern void TFE_OpReset(SafeOpHandle op_to_reset, string op_or_function_name, string raw_device_name, SafeStatusHandle status);
示例#21
0
 public static extern TF_AttrType TFE_OpGetAttrType(SafeOpHandle op, string attr_name, ref byte is_list, SafeStatusHandle status);
示例#22
0
 public static extern void TFE_OpSetAttrShape(SafeOpHandle op, string attr_name, long[] dims, int num_dims, SafeStatusHandle out_status);
示例#23
0
 public static extern SafeDeviceListHandle TFE_ContextListDevices(SafeContextHandle ctx, SafeStatusHandle status);
示例#24
0
 public static extern void TFE_OpSetAttrShapeList(SafeOpHandle op, string attr_name, IntPtr[] dims, int[] num_dims, int num_values, SafeStatusHandle out_status);
示例#25
0
 public static extern void TFE_ExecutorWaitForAllPendingNodes(SafeExecutorHandle executor, SafeStatusHandle status);
示例#26
0
 public static extern void TFE_OpSetAttrValueProto(SafeOpHandle op, string attr_name, IMessage[] proto, int proto_len, SafeStatusHandle status);
示例#27
0
 public static extern int TFE_OpAddInputList(SafeOpHandle op, [In, MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SafeHandleArrayMarshaler))] SafeTensorHandleHandle[] inputs, int num_inputs, SafeStatusHandle status);
示例#28
0
 public static extern void TFE_OpSetDevice(SafeOpHandle op, string device_name, SafeStatusHandle status);
示例#29
0
 public static extern void TFE_ContextAddFunction(SafeContextHandle ctx, IntPtr function, SafeStatusHandle status);
示例#30
0
 public static extern void TF_UpdateEdge(IntPtr graph, TF_Output new_src, TF_Input dst, SafeStatusHandle status);