Added batch normalization layer skeleton

This commit is contained in:
Davis King 2015-11-20 18:20:16 -05:00
parent 627db9e14d
commit b084076ea0
1 changed files with 37 additions and 0 deletions

View File

@ -53,6 +53,43 @@ namespace dlib
template <typename SUBNET>
using con = add_layer<con_, SUBNET>;
// ----------------------------------------------------------------------------------------
class bn_
{
public:
bn_()
{}
template <typename SUBNET>
void setup (const SUBNET& sub)
{
// TODO
}
template <typename SUBNET>
void forward(const SUBNET& sub, resizable_tensor& output)
{
// TODO
}
template <typename SUBNET>
void backward(const tensor& gradient_input, SUBNET& sub, tensor& params_grad)
{
// TODO
}
const tensor& get_layer_params() const { return params; }
tensor& get_layer_params() { return params; }
private:
resizable_tensor params;
};
template <typename SUBNET>
using bn = add_layer<bn_, SUBNET>;
// ----------------------------------------------------------------------------------------
class fc_