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

Function inverse_norms

dlib/cuda/tensor_tools.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44// ----------------------------------------------------------------------------------------
45
46 void inverse_norms (
47 resizable_tensor& invnorms,
48 const tensor& data,
49 const double eps
50 )
51 {
52#ifdef DLIB_USE_CUDA
53 cuda::inverse_norms(invnorms, data, eps);
54#else
55 invnorms = reciprocal(sqrt(sum_cols(squared(mat(data))) + eps));
56#endif
57 }
58
59 void dot_prods (
60 resizable_tensor& out,

Callers 2

test_more_opsFunction · 0.85
forward_inplaceMethod · 0.85

Calls 5

sum_colsFunction · 0.85
squaredFunction · 0.85
matFunction · 0.70
reciprocalFunction · 0.50
sqrtFunction · 0.50

Tested by 1

test_more_opsFunction · 0.68