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

Function inverse_norms

dlib/cuda/tensor_tools.cpp:66–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64// ----------------------------------------------------------------------------------------
65
66 void inverse_norms (
67 resizable_tensor& invnorms,
68 const tensor& data,
69 const double eps
70 )
71 {
72 IF_DLIB_USE_CUDA(
73 cuda::inverse_norms(invnorms, data, eps);
74 )
75
76 IF_DLIB_NOT_USE_CUDA(
77 invnorms = reciprocal(sqrt(sum_cols(squared(mat(data))) + eps));
78 )
79 }
80
81 void dot_prods (
82 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