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

Function sigmoid

dlib/cuda/cudnn_dlibapi.cpp:1872–1891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1870 // ------------------------------------------------------------------------------------
1871
1872 void sigmoid (
1873 tensor& dest,
1874 const tensor& src
1875 )
1876 {
1877 DLIB_CASSERT(have_same_dimensions(dest,src));
1878 if (src.size() == 0)
1879 return;
1880
1881 const float alpha = 1;
1882 const float beta = 0;
1883 CHECK_CUDNN(cudnnActivationForward(context(),
1884 sigmoid_activation_descriptor(),
1885 &alpha,
1886 descriptor(src),
1887 src.device(),
1888 &beta,
1889 descriptor(dest),
1890 dest.device()));
1891 }
1892
1893 void sigmoid_gradient (
1894 tensor& grad,

Callers

nothing calls this directly

Calls 6

descriptorFunction · 0.85
have_same_dimensionsFunction · 0.70
contextFunction · 0.70
sizeMethod · 0.45
deviceMethod · 0.45

Tested by

no test coverage detected