From 88af2a478534c2177332348fc3b5374eb60ba03a Mon Sep 17 00:00:00 2001
From: remi cresson <remi.cresson@inrae.fr>
Date: Fri, 26 Nov 2021 16:01:14 +0100
Subject: [PATCH 1/3] TEST: test also MR against master branch

---
 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a9bd29..fe0ab91 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -80,8 +80,9 @@ ctest:
 .applications_test_base:
   stage: Applications Test
   rules:
-      # Only for MR targeting 'develop' branch because applications tests are slow
+      # Only for MR targeting 'develop' and 'master' branches because applications tests are slow
     - if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'develop'
+    - if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'master'
   artifacts:
     when: on_failure
     paths:
-- 
GitLab


From 10f6534663d6ec0f7d6d10191db36a8afb553b77 Mon Sep 17 00:00:00 2001
From: remi cresson <remi.cresson@inrae.fr>
Date: Fri, 26 Nov 2021 16:01:31 +0100
Subject: [PATCH 2/3] ENH: Avoid the unnecessary warning when no placeholder is
 fed

---
 include/otbTensorflowMultisourceModelBase.hxx | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/include/otbTensorflowMultisourceModelBase.hxx b/include/otbTensorflowMultisourceModelBase.hxx
index 07111b0..2848eeb 100644
--- a/include/otbTensorflowMultisourceModelBase.hxx
+++ b/include/otbTensorflowMultisourceModelBase.hxx
@@ -175,10 +175,19 @@ TensorflowMultisourceModelBase<TInputImage, TOutputImage>::GenerateOutputInforma
   // In case the user hasn't named the output, i.e.  m_OutputTensors = [''],
   // this will return the first output m_OutputLayers = ['PartitionedCall:0']
   StringList constantsNames;
-  std::transform(m_UserPlaceholders.begin(), m_UserPlaceholders.end(), std::back_inserter(constantsNames),
-                 [](const DictElementType& p) { return p.first; });
-  tf::GetTensorAttributes(
-    signaturedef.inputs(), constantsNames, m_InputConstants, m_InputConstantsShapes, m_InputConstantsDataTypes);
+  std::transform(m_UserPlaceholders.begin(),
+                 m_UserPlaceholders.end(),
+                 std::back_inserter(constantsNames),
+                 [](const DictElementType & p) { return p.first; });
+  if (m_UserPlaceholders.size > 0)
+  {
+    // Avoid the unnecessary warning when no placeholder is fed
+    tf::GetTensorAttributes(signaturedef.inputs(),
+                            constantsNames,
+                            m_InputConstants,
+                            m_InputConstantsShapes,
+                            m_InputConstantsDataTypes);
+  }
   tf::GetTensorAttributes(signaturedef.inputs(),
                           m_InputPlaceholders,
                           m_InputLayers,
-- 
GitLab


From 1ba888037f2beb4aea0943dce844792829b9b9d7 Mon Sep 17 00:00:00 2001
From: remi cresson <remi.cresson@inrae.fr>
Date: Fri, 26 Nov 2021 16:30:15 +0100
Subject: [PATCH 3/3] ENH: remove unnecessary warnings

---
 include/otbTensorflowMultisourceModelBase.hxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/otbTensorflowMultisourceModelBase.hxx b/include/otbTensorflowMultisourceModelBase.hxx
index 2848eeb..ba46126 100644
--- a/include/otbTensorflowMultisourceModelBase.hxx
+++ b/include/otbTensorflowMultisourceModelBase.hxx
@@ -179,7 +179,7 @@ TensorflowMultisourceModelBase<TInputImage, TOutputImage>::GenerateOutputInforma
                  m_UserPlaceholders.end(),
                  std::back_inserter(constantsNames),
                  [](const DictElementType & p) { return p.first; });
-  if (m_UserPlaceholders.size > 0)
+  if (m_UserPlaceholders.size() > 0)
   {
     // Avoid the unnecessary warning when no placeholder is fed
     tf::GetTensorAttributes(signaturedef.inputs(),
-- 
GitLab