COMPMID-987: Make beta and gamma optional in BatchNormalization

Currently we have beta and gamma compulsory in Batch normalization. There are
network that might not need one or both of those. Thus these should be optional
with beta(offset) defaulting to zero and gamma(scale) to 1. Will also reduce
some memory requirements.

Change-Id: I15bf1ec14b814be2acebf1be1a4fba9c4fbd3190
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/123237
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h
index ae88824..4bbe4c5 100644
--- a/tests/AssetsLibrary.h
+++ b/tests/AssetsLibrary.h
@@ -352,6 +352,16 @@
     template <typename T>
     void fill_layer_data(T &&tensor, std::string name) const;
 
+    /** Fill a tensor with a constant value
+     *
+     * @param[in, out] tensor To be filled tensor.
+     * @param[in]      value  Value to be assigned to all elements of the input tensor.
+     *
+     * @note    @p value must be of the same type as the data type of @p tensor
+     */
+    template <typename T, typename D>
+    void fill_tensor_value(T &&tensor, D value) const;
+
 private:
     // Function prototype to convert between image formats.
     using Converter = void (*)(const RawTensor &src, RawTensor &dst);
@@ -774,6 +784,12 @@
         });
     }
 }
+
+template <typename T, typename D>
+void AssetsLibrary::fill_tensor_value(T &&tensor, D value) const
+{
+    fill_tensor_uniform(tensor, 0, value, value);
+}
 } // namespace test
 } // namespace arm_compute
 #endif /* __ARM_COMPUTE_TEST_TENSOR_LIBRARY_H__ */