From 10f39ad2033169afe523b2c851ccf3cf077b0826 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Thu, 14 Nov 2019 22:46:49 -0600 Subject: [PATCH] Rollback #448 --- src/TensorFlowNET.Core/Summaries/Summary.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/TensorFlowNET.Core/Summaries/Summary.cs b/src/TensorFlowNET.Core/Summaries/Summary.cs index 84889845..56772087 100644 --- a/src/TensorFlowNET.Core/Summaries/Summary.cs +++ b/src/TensorFlowNET.Core/Summaries/Summary.cs @@ -37,10 +37,13 @@ namespace Tensorflow.Summaries return val; } - public Tensor merge_all(string key = "summaries", string scope= null, string name= null) + public Tensor merge_all(string key = "summaries", string scope = null, string name = null) { - var summary_ops = ops.get_collection(key, scope: scope); - return merge(summary_ops.Select(x => x as Tensor).ToArray(), name: name); + var summary_ops = ops.get_collection(key, scope: scope); + if (summary_ops == null) + return null; + else + return merge((summary_ops as List).Select(x => x as Tensor).ToArray(), name: name); } ///