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)) {