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

Function affine_transform

dlib/cuda/cpu_dlib.cpp:478–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476 // -----------------------------------------------------------------------------------
477
478 void affine_transform(
479 tensor& dest,
480 const tensor& src,
481 const float A,
482 const float B
483 )
484 {
485 DLIB_CASSERT(dest.size()==src.size());
486 const auto d = dest.host();
487 const auto s = src.host();
488 for (size_t i = 0; i < src.size(); ++i)
489 d[i] = A*s[i] + B;
490 }
491
492 void affine_transform(
493 tensor& dest,

Callers 10

averageMethod · 0.70
test_basic_tensor_opsFunction · 0.50
test_affine_rectFunction · 0.50
test_more_opsFunction · 0.50
forward_inplaceMethod · 0.50
backward_inplaceMethod · 0.50
forward_inplaceMethod · 0.50
sgdClass · 0.50

Calls 13

have_same_dimensionsFunction · 0.70
rectangleClass · 0.50
sizeMethod · 0.45
hostMethod · 0.45
num_samplesMethod · 0.45
nrMethod · 0.45
ncMethod · 0.45
kMethod · 0.45
containsMethod · 0.45
topMethod · 0.45
bottomMethod · 0.45
leftMethod · 0.45

Tested by 3

test_basic_tensor_opsFunction · 0.40
test_affine_rectFunction · 0.40
test_more_opsFunction · 0.40