From 78905e386477403bc0df80def61d04e453acfad5 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sat, 26 Dec 2020 12:12:46 -0600 Subject: [PATCH] fix unit test. --- src/TensorFlowNET.Core/Functions/ConcreteFunction.cs | 2 +- src/TensorFlowNET.Core/Graphs/AutoGraphAttribute.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Core/Functions/ConcreteFunction.cs b/src/TensorFlowNET.Core/Functions/ConcreteFunction.cs index 4f701e2e..e9ca28d8 100644 --- a/src/TensorFlowNET.Core/Functions/ConcreteFunction.cs +++ b/src/TensorFlowNET.Core/Functions/ConcreteFunction.cs @@ -40,7 +40,7 @@ namespace Tensorflow.Functions { func_graph = graph; - ToGraph(graph.Inputs, graph.Outputs); + ToGraph(graph.Inputs, graph.Outputs.Where(x => x != null).ToArray()); } public ConcreteFunction(Func func, TF_DataType dtype) diff --git a/src/TensorFlowNET.Core/Graphs/AutoGraphAttribute.cs b/src/TensorFlowNET.Core/Graphs/AutoGraphAttribute.cs index b63f70aa..7c5ab96b 100644 --- a/src/TensorFlowNET.Core/Graphs/AutoGraphAttribute.cs +++ b/src/TensorFlowNET.Core/Graphs/AutoGraphAttribute.cs @@ -18,7 +18,7 @@ namespace Tensorflow.Graphs public override void OnEntry(MethodExecutionArgs args) { - func_name = $"autograph_{args.Instance.GetHashCode()}.{args.Method.Name}"; + func_name = $"autograph_{args.Instance.GetType().FullName}.{args.Method.Name}"; if (functions.ContainsKey(func_name)) {