Commit e9a443fd authored by Remi Cresson's avatar Remi Cresson
Browse files

ADD: no-data support

2 merge requests!88Release v4.1.0,!83Tfmodelserve nodata
Pipeline #46047 failed with stages
in 11 minutes and 31 seconds
Showing with 3 additions and 2 deletions
+3 -2
......@@ -132,11 +132,12 @@ TensorflowMultisourceModelBase<TInputImage, TOutputImage>::RunSession(DictType &
inputs_new.emplace_back(m_InputLayers[k], inputTensor);
if (m_InputUseNodata[k] == true)
{
tensorflow::int64 ndCount = 0;
const auto nodataValue = m_InputNodataValues[k];
const tensorflow::int64 nElmT = inputTensor.NumElements();
tensorflow::int64 ndCount = 0;
auto array = inputTensor.flat<InternalPixelType>();
for (tensorflow::int64 i = 0 ; i < nElmT ; i++)
if (array(i) == m_InputNodataValues[k])
if (array(i) == nodataValue)
ndCount++;
if (ndCount == nElmT)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment