IVGCVSW-6119 ConstTensorsAsInput: FullyConnected Bug Fix

 * Updated FullyConnected layer member variables when cloning as
   some backends still require them.
 * Added SetConstant call when using deprecated AddFullyConnectedLayer
   method to ensure backwards compatibility.
 * Added SetConstant to SimpleSample to ensure it runs on all backends.

Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Ie7b4e4b868f23f8fcf9c41ffd12e2ea9ea53afca
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index 22a71c4..365f1bd 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -1805,7 +1805,11 @@
     {
         weightsLayer = m_Graph->AddLayer<ConstantLayer>("Weights");
         weightsLayer->m_LayerOutput = std::make_shared<ScopedTensorHandle>(weights.value());
-        weightsLayer->GetOutputSlot(0).SetTensorInfo(weightsLayer->m_LayerOutput->GetTensorInfo());
+
+        TensorInfo weightsInfo = weightsLayer->m_LayerOutput->GetTensorInfo();
+        weightsInfo.SetConstant();
+
+        weightsLayer->GetOutputSlot(0).SetTensorInfo(weightsInfo);
     }
     else if (fullyConnectedDescriptor.m_ConstantWeights)
     {
@@ -1817,7 +1821,11 @@
     {
         biasLayer = m_Graph->AddLayer<ConstantLayer>("Biases");
         biasLayer->m_LayerOutput = std::make_shared<ScopedTensorHandle>(biases.value());
-        biasLayer->GetOutputSlot(0).SetTensorInfo(biasLayer->m_LayerOutput->GetTensorInfo());
+
+        TensorInfo biasInfo = biasLayer->m_LayerOutput->GetTensorInfo();
+        biasInfo.SetConstant();
+
+        biasLayer->GetOutputSlot(0).SetTensorInfo(biasInfo);
     }
 
     if (numInputs < 2)