@@ -78,7 +78,7 @@ public partial class c_api
7878 /// <param name="num_return_outputs">int</param>
7979 /// <param name="status">TF_Status*</param>
8080 [ DllImport ( TensorFlowLibName ) ]
81- public static extern unsafe void TF_GraphImportGraphDefWithReturnOutputs ( IntPtr graph , IntPtr graph_def , IntPtr options , IntPtr return_outputs , int num_return_outputs , SafeStatusHandle status ) ;
81+ public static extern unsafe void TF_GraphImportGraphDefWithReturnOutputs ( IntPtr graph , IntPtr graph_def , SafeImportGraphDefOptionsHandle options , IntPtr return_outputs , int num_return_outputs , SafeStatusHandle status ) ;
8282
8383 /// <summary>
8484 /// Import the graph serialized in `graph_def` into `graph`. Returns nullptr and
@@ -92,7 +92,7 @@ public partial class c_api
9292 /// <param name="status">TF_Status*</param>
9393 /// <returns>TF_ImportGraphDefResults*</returns>
9494 [ DllImport ( TensorFlowLibName ) ]
95- public static extern IntPtr TF_GraphImportGraphDefWithResults ( IntPtr graph , IntPtr graph_def , IntPtr options , SafeStatusHandle status ) ;
95+ public static extern IntPtr TF_GraphImportGraphDefWithResults ( IntPtr graph , IntPtr graph_def , SafeImportGraphDefOptionsHandle options , SafeStatusHandle status ) ;
9696
9797 /// <summary>
9898 /// Import the graph serialized in `graph_def` into `graph`.
@@ -102,7 +102,7 @@ public partial class c_api
102102 /// <param name="options">TF_ImportGraphDefOptions*</param>
103103 /// <param name="status">TF_Status*</param>
104104 [ DllImport ( TensorFlowLibName ) ]
105- public static extern void TF_GraphImportGraphDef ( IntPtr graph , IntPtr graph_def , IntPtr options , SafeStatusHandle status ) ;
105+ public static extern void TF_GraphImportGraphDef ( IntPtr graph , IntPtr graph_def , SafeImportGraphDefOptionsHandle options , SafeStatusHandle status ) ;
106106
107107 /// <summary>
108108 /// Iterate through the operations of a graph.
@@ -160,7 +160,7 @@ public partial class c_api
160160 /// <param name="opts"></param>
161161 /// <param name="oper"></param>
162162 [ DllImport ( TensorFlowLibName ) ]
163- public static extern void TF_ImportGraphDefOptionsAddControlDependency ( IntPtr opts , IntPtr oper ) ;
163+ public static extern void TF_ImportGraphDefOptionsAddControlDependency ( SafeImportGraphDefOptionsHandle opts , IntPtr oper ) ;
164164
165165 /// <summary>
166166 /// Set any imported nodes with input `src_name:src_index` to have that input
@@ -173,7 +173,7 @@ public partial class c_api
173173 /// <param name="src_index">int</param>
174174 /// <param name="dst">TF_Output</param>
175175 [ DllImport ( TensorFlowLibName ) ]
176- public static extern void TF_ImportGraphDefOptionsAddInputMapping ( IntPtr opts , string src_name , int src_index , TF_Output dst ) ;
176+ public static extern void TF_ImportGraphDefOptionsAddInputMapping ( SafeImportGraphDefOptionsHandle opts , string src_name , int src_index , TF_Output dst ) ;
177177
178178 /// <summary>
179179 /// Add an operation in `graph_def` to be returned via the `return_opers` output
@@ -183,7 +183,7 @@ public partial class c_api
183183 /// <param name="opts">TF_ImportGraphDefOptions* opts</param>
184184 /// <param name="oper_name">const char*</param>
185185 [ DllImport ( TensorFlowLibName ) ]
186- public static extern void TF_ImportGraphDefOptionsAddReturnOperation ( IntPtr opts , string oper_name ) ;
186+ public static extern void TF_ImportGraphDefOptionsAddReturnOperation ( SafeImportGraphDefOptionsHandle opts , string oper_name ) ;
187187
188188 /// <summary>
189189 /// Add an output in `graph_def` to be returned via the `return_outputs` output
@@ -195,7 +195,7 @@ public partial class c_api
195195 /// <param name="oper_name">const char*</param>
196196 /// <param name="index">int</param>
197197 [ DllImport ( TensorFlowLibName ) ]
198- public static extern void TF_ImportGraphDefOptionsAddReturnOutput ( IntPtr opts , string oper_name , int index ) ;
198+ public static extern void TF_ImportGraphDefOptionsAddReturnOutput ( SafeImportGraphDefOptionsHandle opts , string oper_name , int index ) ;
199199
200200 /// <summary>
201201 /// Returns the number of return operations added via
@@ -204,7 +204,7 @@ public partial class c_api
204204 /// <param name="opts"></param>
205205 /// <returns></returns>
206206 [ DllImport ( TensorFlowLibName ) ]
207- public static extern int TF_ImportGraphDefOptionsNumReturnOperations ( IntPtr opts ) ;
207+ public static extern int TF_ImportGraphDefOptionsNumReturnOperations ( SafeImportGraphDefOptionsHandle opts ) ;
208208
209209 /// <summary>
210210 /// Returns the number of return outputs added via
@@ -213,7 +213,7 @@ public partial class c_api
213213 /// <param name="opts">const TF_ImportGraphDefOptions*</param>
214214 /// <returns></returns>
215215 [ DllImport ( TensorFlowLibName ) ]
216- public static extern int TF_ImportGraphDefOptionsNumReturnOutputs ( IntPtr opts ) ;
216+ public static extern int TF_ImportGraphDefOptionsNumReturnOutputs ( SafeImportGraphDefOptionsHandle opts ) ;
217217
218218 /// <summary>
219219 /// Set any imported nodes with control input `src_name` to have that input
@@ -225,7 +225,7 @@ public partial class c_api
225225 /// <param name="src_name">const char*</param>
226226 /// <param name="dst">TF_Operation*</param>
227227 [ DllImport ( TensorFlowLibName ) ]
228- public static extern void TF_ImportGraphDefOptionsRemapControlDependency ( IntPtr opts , string src_name , IntPtr dst ) ;
228+ public static extern void TF_ImportGraphDefOptionsRemapControlDependency ( SafeImportGraphDefOptionsHandle opts , string src_name , IntPtr dst ) ;
229229
230230 /// <summary>
231231 /// Set the prefix to be prepended to the names of nodes in `graph_def` that will
@@ -234,7 +234,7 @@ public partial class c_api
234234 /// </summary>
235235 /// <param name="ops"></param>
236236 [ DllImport ( TensorFlowLibName ) ]
237- public static extern void TF_ImportGraphDefOptionsSetPrefix ( IntPtr ops , string prefix ) ;
237+ public static extern void TF_ImportGraphDefOptionsSetPrefix ( SafeImportGraphDefOptionsHandle ops , string prefix ) ;
238238
239239 /// <summary>
240240 /// Set whether to uniquify imported operation names. If true, imported operation
@@ -246,7 +246,7 @@ public partial class c_api
246246 /// <param name="ops">TF_ImportGraphDefOptions*</param>
247247 /// <param name="uniquify_prefix">unsigned char</param>
248248 [ DllImport ( TensorFlowLibName ) ]
249- public static extern void TF_ImportGraphDefOptionsSetUniquifyNames ( IntPtr ops , char uniquify_prefix ) ;
249+ public static extern void TF_ImportGraphDefOptionsSetUniquifyNames ( SafeImportGraphDefOptionsHandle ops , char uniquify_prefix ) ;
250250
251251 /// <summary>
252252 /// Fetches the return operations requested via
@@ -295,7 +295,7 @@ public static extern IntPtr TF_LoadSessionFromSavedModel(IntPtr session_options,
295295 public static extern IntPtr TF_NewGraph ( ) ;
296296
297297 [ DllImport ( TensorFlowLibName ) ]
298- public static extern IntPtr TF_NewImportGraphDefOptions ( ) ;
298+ public static extern SafeImportGraphDefOptionsHandle TF_NewImportGraphDefOptions ( ) ;
299299
300300 /// <summary>
301301 /// Updates 'dst' to consume 'new_src'.
0 commit comments