[weight] Add missing initialization in constructor
authorParichay Kapoor <pk.kapoor@samsung.com>
Wed, 14 Jul 2021 08:46:00 +0000 (17:46 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Thu, 22 Jul 2021 11:47:24 +0000 (20:47 +0900)
Add missing initialization in constructor for the weight class.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
nntrainer/tensor/weight.h

index e67e846..72c9959 100644 (file)
@@ -118,7 +118,10 @@ public:
    * if the owner of these tensors free the tensors.
    */
   explicit Weight(const Tensor &v, const Tensor &g, const std::string &n = "") :
-    Var_Grad(v, g, n) {}
+    Var_Grad(v, g, n),
+    initializer(WeightInitializer::WEIGHT_XAVIER_UNIFORM),
+    regularizer(WeightRegularizer::NONE),
+    regularizer_constant(1.0f) {}
 
   /**
    * @copydoc var_grad::initializeVariable(const Tensor &)