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

Function apply_act_depth_scaling

dlib/cuda/tensor_tools.cpp:1668–1688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1666 }
1667
1668 void apply_act_depth_scaling(
1669 tensor& gradients,
1670 const tensor& n_steps,
1671 long batch_size,
1672 long seq_len,
1673 long d_model,
1674 long num_channels,
1675 float max_steps,
1676 float scale_factor
1677 )
1678 {
1679 IF_DLIB_USE_CUDA(
1680 cuda::apply_act_depth_scaling(gradients, n_steps, batch_size, seq_len,
1681 d_model, num_channels, max_steps, scale_factor);
1682 )
1683
1684 IF_DLIB_NOT_USE_CUDA(
1685 cpu::apply_act_depth_scaling(gradients, n_steps, batch_size, seq_len,
1686 d_model, num_channels, max_steps, scale_factor);
1687 )
1688 }
1689
1690// ----------------------------------------------------------------------------------------
1691

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected