MCPcopy Create free account
hub / github.com/davisking/dlib / scale_columns

Function scale_columns

dlib/cuda/tensor_tools.cpp:89–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 void scale_columns (
90 tensor& out,
91 const tensor& m,
92 const tensor& v
93 )
94 {
95 DLIB_CASSERT(have_same_dimensions(out,m));
96 DLIB_CASSERT(is_vector(v));
97 if (m.size() == 0 && v.size() == 0)
98 return;
99 DLIB_CASSERT(m.size() != 0);
100 DLIB_CASSERT(m.size()/m.num_samples() == v.size());
101
102#ifdef DLIB_USE_CUDA
103 cuda::scale_columns(out, m, v);
104#else
105 out = scale_columns(mat(m), mat(v));
106#endif
107 }
108
109 void scale_rows (
110 tensor& out,

Callers 5

train_pca_implMethod · 0.50
test_basic_tensor_opsFunction · 0.50
matrix_testFunction · 0.50
do_trainMethod · 0.50
do_trainMethod · 0.50

Calls 5

have_same_dimensionsFunction · 0.70
is_vectorFunction · 0.70
matFunction · 0.70
sizeMethod · 0.45
num_samplesMethod · 0.45

Tested by 2

test_basic_tensor_opsFunction · 0.40
matrix_testFunction · 0.40