Commit d2516bc2 authored by Davis King's avatar Davis King

Just renamed two functions to way better names.

parent 1f5aa6c1
...@@ -110,7 +110,7 @@ namespace dlib ...@@ -110,7 +110,7 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void add_bias_gradient ( void assign_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
) )
......
...@@ -32,7 +32,7 @@ namespace dlib ...@@ -32,7 +32,7 @@ namespace dlib
const tensor& src const tensor& src
); );
void add_bias_gradient ( void assign_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
); );
......
...@@ -223,7 +223,7 @@ namespace dlib ...@@ -223,7 +223,7 @@ namespace dlib
} }
} }
void add_bias_gradient ( void assign_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
) )
......
...@@ -71,7 +71,7 @@ namespace dlib ...@@ -71,7 +71,7 @@ namespace dlib
// ----------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------
void add_bias_gradient ( void assign_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
); );
......
...@@ -248,7 +248,7 @@ namespace dlib ...@@ -248,7 +248,7 @@ namespace dlib
&value)); &value));
} }
void add_conv_bias_gradient ( void assign_conv_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
) )
......
...@@ -111,7 +111,7 @@ namespace dlib ...@@ -111,7 +111,7 @@ namespace dlib
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
void add_conv_bias_gradient ( void assign_conv_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
); );
......
...@@ -124,7 +124,7 @@ namespace dlib ...@@ -124,7 +124,7 @@ namespace dlib
auto filt = filters(params_grad,0); auto filt = filters(params_grad,0);
conv.get_gradient_for_filters (gradient_input, sub.get_output(), filt); conv.get_gradient_for_filters (gradient_input, sub.get_output(), filt);
auto b = biases(params_grad, filters.size()); auto b = biases(params_grad, filters.size());
tt::add_conv_bias_gradient(b, gradient_input); tt::assign_conv_bias_gradient(b, gradient_input);
} }
const tensor& get_layer_params() const { return params; } const tensor& get_layer_params() const { return params; }
...@@ -625,7 +625,7 @@ namespace dlib ...@@ -625,7 +625,7 @@ namespace dlib
{ {
// compute the gradient of the bias parameters. // compute the gradient of the bias parameters.
auto pb = biases(params_grad, weights.size()); auto pb = biases(params_grad, weights.size());
tt::add_bias_gradient(pb, gradient_input); tt::assign_bias_gradient(pb, gradient_input);
} }
// compute the gradient for the data // compute the gradient for the data
...@@ -812,7 +812,7 @@ namespace dlib ...@@ -812,7 +812,7 @@ namespace dlib
tt::multiply(data_grad, gradient_input, g); tt::multiply(data_grad, gradient_input, g);
tt::multiply(g_grad, gradient_input, computed_output); tt::multiply(g_grad, gradient_input, computed_output);
tt::add_bias_gradient(b_grad, gradient_input); tt::assign_bias_gradient(b_grad, gradient_input);
} }
const tensor& get_layer_params() const { return params; } const tensor& get_layer_params() const { return params; }
......
...@@ -325,13 +325,13 @@ namespace dlib { namespace tt ...@@ -325,13 +325,13 @@ namespace dlib { namespace tt
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void add_conv_bias_gradient ( void assign_conv_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
) )
{ {
#ifdef DLIB_USE_CUDA #ifdef DLIB_USE_CUDA
cuda::add_conv_bias_gradient(grad,gradient_input); cuda::assign_conv_bias_gradient(grad,gradient_input);
#else #else
// TODO // TODO
DLIB_CASSERT(false,""); DLIB_CASSERT(false,"");
...@@ -340,15 +340,15 @@ namespace dlib { namespace tt ...@@ -340,15 +340,15 @@ namespace dlib { namespace tt
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void add_bias_gradient ( void assign_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
) )
{ {
#ifdef DLIB_USE_CUDA #ifdef DLIB_USE_CUDA
cuda::add_bias_gradient(grad,gradient_input); cuda::assign_bias_gradient(grad,gradient_input);
#else #else
cpu::add_bias_gradient(grad,gradient_input); cpu::assign_bias_gradient(grad,gradient_input);
#endif #endif
} }
......
...@@ -426,7 +426,7 @@ namespace dlib { namespace tt ...@@ -426,7 +426,7 @@ namespace dlib { namespace tt
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void add_conv_bias_gradient ( void assign_conv_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
); );
...@@ -449,7 +449,7 @@ namespace dlib { namespace tt ...@@ -449,7 +449,7 @@ namespace dlib { namespace tt
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void add_bias_gradient ( void assign_bias_gradient (
tensor& grad, tensor& grad,
const tensor& gradient_input const tensor& gradient_input
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment