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

Function scale_columns

dlib/cuda/tensor_tools.cpp:115–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 }
114
115 void scale_columns (
116 tensor& out,
117 const tensor& m,
118 const tensor& v
119 )
120 {
121 DLIB_CASSERT(have_same_dimensions(out,m));
122 DLIB_CASSERT(is_vector(v));
123 if (m.size() == 0 && v.size() == 0)
124 return;
125 DLIB_CASSERT(m.size() != 0);
126 DLIB_CASSERT(m.size()/m.num_samples() == v.size());
127
128 IF_DLIB_USE_CUDA(
129 cuda::scale_columns(out, m, v);
130 )
131
132 IF_DLIB_NOT_USE_CUDA(
133 out = scale_columns(mat(m), mat(v));
134 )
135 }
136
137 void scale_rows (
138 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