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

Function scale_rows

dlib/cuda/tensor_tools.cpp:137–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 }
136
137 void scale_rows (
138 tensor& out,
139 const tensor& m,
140 const tensor& v
141 )
142 {
143 DLIB_CASSERT(have_same_dimensions(out,m));
144 DLIB_CASSERT(is_vector(v));
145 if (m.size() == 0 && v.size() == 0)
146 return;
147 DLIB_CASSERT(m.size() != 0);
148 DLIB_CASSERT(m.num_samples() == static_cast<long long>(v.size()));
149
150 IF_DLIB_USE_CUDA(
151 cuda::scale_rows(out, m, v);
152 )
153
154 IF_DLIB_NOT_USE_CUDA(
155 out = scale_rows(mat(m), mat(v));
156 )
157 }
158
159 void scale_rows2 (
160 float beta,

Callers 4

scale_rows2Function · 0.70
test_more_opsFunction · 0.50
matrix_testFunction · 0.50
forward_inplaceMethod · 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_more_opsFunction · 0.40
matrix_testFunction · 0.40