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

Function assign_conv_bias_gradient

dlib/cuda/cudnn_dlibapi.cpp:305–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303 }
304
305 void assign_conv_bias_gradient (
306 tensor& grad,
307 const tensor& gradient_input
308 )
309 {
310 DLIB_CASSERT(
311 grad.num_samples() == 1 &&
312 grad.k() >= 1 &&
313 grad.nr() == 1 &&
314 grad.nc() == 1 &&
315 gradient_input.k() == grad.k() &&
316 gradient_input.size() > 0 &&
317 is_same_object(grad,gradient_input) == false
318 );
319
320 const float alpha = 1;
321 const float beta = 0;
322 CHECK_CUDNN(cudnnConvolutionBackwardBias(context(),
323 &alpha,
324 descriptor(gradient_input),
325 gradient_input.device(),
326 &beta,
327 descriptor(grad),
328 grad.device()));
329 }
330
331 // ------------------------------------------------------------------------------------
332

Callers

nothing calls this directly

Calls 9

descriptorFunction · 0.85
contextFunction · 0.70
is_same_objectFunction · 0.50
num_samplesMethod · 0.45
kMethod · 0.45
nrMethod · 0.45
ncMethod · 0.45
sizeMethod · 0.45
deviceMethod · 0.45

Tested by

no test coverage detected