diff --git a/dlib/dnn/tensor_tools.cpp b/dlib/dnn/tensor_tools.cpp
index 2a2c8290d5648e22a6e157438823eb1aaf23c2cb..46c200523f94b88ccd7d15196b5ec7eae7f0446e 100644
--- a/dlib/dnn/tensor_tools.cpp
+++ b/dlib/dnn/tensor_tools.cpp
@@ -5,6 +5,7 @@
 
 #include "tensor_tools.h"
 #include "cpu_dlib.h"
+#include "cuda_dlib.h"
 
 namespace dlib { namespace tt
 {
@@ -55,7 +56,7 @@ namespace dlib { namespace tt
     {
         DLIB_CASSERT(data.size()%2 == 0,"");
 #ifdef DLIB_USE_CUDA
-        rnd.fill_gaussian(data);
+        rnd.fill_gaussian(data, mean, stddev);
 #else
         for (auto& x : data) 
             x = rnd.get_random_gaussian()*stddev + mean;