@@ -929,6 +929,23 @@ public class TFLib {
929929 // Deleting a function does not remove it from any graphs it was copied to.
930930 public static var DeleteFunction : @convention ( c) ( OpaquePointer ? ) -> Void = { _ in }
931931
932+ // Set whether to uniquify imported operation names. If true, imported operation
933+ // names will be modified if their name already exists in the graph. If false,
934+ // conflicting names will be treated as an error. Note that this option has no
935+ // effect if a prefix is set, since the prefix will guarantee all names are
936+ // unique. Defaults to false.
937+ //TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsSetUniquifyNames(
938+ //TF_ImportGraphDefOptions* opts, unsigned char uniquify_names);
939+ public static var ImportGraphDefOptionsSetUniquifyNames : @convention ( c) ( OpaquePointer , UInt8 ) -> Void = { _, _ in }
940+
941+ // If true, the specified prefix will be modified if it already exists as an
942+ // operation name or prefix in the graph. If false, a conflicting prefix will be
943+ // treated as an error. This option has no effect if no prefix is specified.
944+ // TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsSetUniquifyPrefix(
945+ // TF_ImportGraphDefOptions* opts, unsigned char uniquify_prefix);
946+ public static var ImportGraphDefOptionsSetUniquifyPrefix : @convention ( c) ( OpaquePointer , UInt8 ) -> Void = { _, _ in }
947+
948+
932949 /// Bootstrap of tensorflow library open, **MUST BE CALL BEFORE ANY OPERATIONS**
933950 /// - parameters
934951 /// - library: the installation path of library TensorFlow for C, /usr/local/lib/libtensorflow.so by default
@@ -950,6 +967,11 @@ public class TFLib {
950967 throw Panic . DLL ( reason: " Version \( ver) is obsolete and out of support. " )
951968 }
952969
970+ if ver >= " 1.4.1 " {
971+ ImportGraphDefOptionsSetUniquifyNames = try LoadFunction ( lib, " TF_ImportGraphDefOptionsSetUniquifyNames " )
972+ ImportGraphDefOptionsSetUniquifyPrefix = try LoadFunction ( lib, " TF_ImportGraphDefOptionsSetUniquifyPrefix " )
973+ }
974+
953975 if ver >= " 1.4.0 " {
954976 GraphCopyFunction = try LoadFunction ( lib, " TF_GraphCopyFunction " )
955977 GraphToFunction = try LoadFunction ( lib, " TF_GraphToFunction " )
0 commit comments