예제 #1
0
        public Operation[] ReturnOperations(SafeImportGraphDefResultsHandle results)
        {
            TF_Operation return_oper_handle = new TF_Operation();
            int          num_return_opers   = 0;

            c_api.TF_ImportGraphDefResultsReturnOperations(results, ref num_return_opers, ref return_oper_handle);
            Operation[] return_opers = new Operation[num_return_opers];
            var         tf_op_size   = Marshal.SizeOf <TF_Operation>();

            for (int i = 0; i < num_return_opers; i++)
            {
                unsafe
                {
                    var handle = return_oper_handle.node + tf_op_size * i;
                    return_opers[i] = new Operation(*(IntPtr *)handle);
                }
            }

            return(return_opers);
        }
예제 #2
0
 public static extern void TF_ImportGraphDefResultsReturnOutputs(SafeImportGraphDefResultsHandle results, ref int num_outputs, ref IntPtr outputs);
예제 #3
0
 public static extern void TF_ImportGraphDefResultsReturnOperations(SafeImportGraphDefResultsHandle results, ref int num_opers, ref TF_Operation opers);
 public TF_ImportGraphDefResults(SafeImportGraphDefResultsHandle handle)
 {
     Handle = handle;
 }