Commit 7b35d7b2 authored by Davis King's avatar Davis King
Browse files

removed inappropriate assert

parent e7087e59
...@@ -102,7 +102,6 @@ namespace dlib { namespace tt ...@@ -102,7 +102,6 @@ namespace dlib { namespace tt
#ifdef DLIB_USE_CUDA #ifdef DLIB_USE_CUDA
cuda::scale_columns(out, m, v); cuda::scale_columns(out, m, v);
#else #else
DLIB_CASSERT(false, "shouldn't be called right now");
out = scale_columns(mat(m), mat(v)); out = scale_columns(mat(m), mat(v));
#endif #endif
} }
......
...@@ -597,6 +597,20 @@ namespace ...@@ -597,6 +597,20 @@ namespace
#endif #endif
} }
{
const int nr = 5;
const int nc = 6;
tensor_rand rnd;
resizable_tensor out1(nr,nc), m(nr,nc), v(nc), out2;
rnd.fill_uniform(out1);
rnd.fill_uniform(m);
rnd.fill_uniform(v);
tt::scale_columns(out1, m, v);
out2 = scale_columns(mat(m), mat(v));
DLIB_TEST(max(abs(mat(out1)-mat(out2))) < 1e-6);
}
{ {
resizable_tensor A, B; resizable_tensor A, B;
A.set_size(11); A.set_size(11);
......
Markdown is supported
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