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

Function scale_rows

dlib/cuda/tensor_tools.cpp:109–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 void scale_rows (
110 tensor& out,
111 const tensor& m,
112 const tensor& v
113 )
114 {
115 DLIB_CASSERT(have_same_dimensions(out,m));
116 DLIB_CASSERT(is_vector(v));
117 if (m.size() == 0 && v.size() == 0)
118 return;
119 DLIB_CASSERT(m.size() != 0);
120 DLIB_CASSERT(m.num_samples() == static_cast<long long>(v.size()));
121
122#ifdef DLIB_USE_CUDA
123 cuda::scale_rows(out, m, v);
124#else
125 out = scale_rows(mat(m), mat(v));
126#endif
127 }
128
129 void scale_rows2 (
130 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