Notes on CoveNet
Published:
This is my study note on the derivations for convolutional neural networks. If you have any question, please feel free to contact me by zhongzisha@outlook.com. Any comments are greatly appreciated!
Activation functions
sigmoid function
hyperbolic tangent function
RELU function
Leaky ReLU
where
Parametric ReLU
The in Leaky ReLU is learned in the training via backpropagation.
Randomized Leaky ReLU
where is sampled from a uniform distribution.
Neural Net
We have a set of training samples: , the neuron is defined as
where , , , .
then, we have
Suppose we have an -layer network. The loss function is defined as
then,
then
A Neural Net Case
Suppose we have
For Euclidean loss:
For cross-entropy loss:
then, we could get the error derivatives and the update rules as follows (suppose we use Euclidean loss and sigmoid activation function):
A CNN Case
I-C1-MP1-FC1-O
Suppose the net structure is I-C1-MP1-FC1-O, then we have
For Euclidean loss:
For cross-entropy loss:
From the , we could get
Then, we have
then, we upsample the error sensitity and get
then, we get
then, we get the following gradients
I-C1-MP1-C2-MP2-FC1-O
Suppose the net structure is I-C1-MP1-C2-MP2-FC1-O. For I1-C1-MP1, we have where is the number of convolution feature maps, and
For I2-C2-MP2, we have, , , where is the number of convolution feature maps, and
For I3-FC1-O, we have
For Euclidean loss
For cross-entropy loss
Here, is the error sensitivity of the reshaped output of the second maxpooling layer. Thus we have get the , then we get
then, we upsample the error sensitivity and get
then, we continue backpropagate the error sensitity
then, we use the following operations to get the error sensity of
From , we could get , then
then, we upsample the error sensitity and have
then, we continue backpropagate the error sensitity
then, we use the following operations to get the error sensity of