From a5af32f4969ecb72850784cc29272f06e7f28d4c Mon Sep 17 00:00:00 2001 From: Nam Dinh Date: Tue, 28 Jul 2020 21:21:54 +0700 Subject: [PATCH] add config photo for LoadFromSavedModel --- src/TensorFlowNET.Core/Sessions/Session.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Core/Sessions/Session.cs b/src/TensorFlowNET.Core/Sessions/Session.cs index c60a49c1..96180452 100644 --- a/src/TensorFlowNET.Core/Sessions/Session.cs +++ b/src/TensorFlowNET.Core/Sessions/Session.cs @@ -41,13 +41,13 @@ namespace Tensorflow } [MethodImpl(MethodImplOptions.NoOptimization)] - public static Session LoadFromSavedModel(string path) + public static Session LoadFromSavedModel(string path,string target="",ConfigProto config=null) { lock (Locks.ProcessWide) { var graph = c_api.TF_NewGraph(); var status = new Status(); - var opt = new SessionOptions(); + var opt = new SessionOptions(target,config); var tags = new string[] {"serve"}; var buffer = new TF_Buffer();