From d23eed0c34520da875f84751fcfc3f1ed13ffa7b Mon Sep 17 00:00:00 2001 From: Eli Belash Date: Tue, 10 Sep 2019 16:13:55 +0300 Subject: [PATCH] Session.LoadFromSavedModel: Prevent optimization --- src/TensorFlowNET.Core/Sessions/Session.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TensorFlowNET.Core/Sessions/Session.cs b/src/TensorFlowNET.Core/Sessions/Session.cs index 130da69b..a89d94dc 100644 --- a/src/TensorFlowNET.Core/Sessions/Session.cs +++ b/src/TensorFlowNET.Core/Sessions/Session.cs @@ -16,6 +16,7 @@ using System; using System.IO; +using System.Runtime.CompilerServices; using Tensorflow.Util; using static Tensorflow.Binding; @@ -40,6 +41,7 @@ namespace Tensorflow return this; } + [MethodImpl(MethodImplOptions.NoOptimization)] public static Session LoadFromSavedModel(string path) { lock (Locks.ProcessWide)