Data propagation through IP layer in the Lenet

54 views
Skip to first unread message

Khalid Ashraf

unread,
Oct 20, 2014, 6:37:54 PM10/20/14
to caffe...@googlegroups.com
I am trying to make sense of how the input data propagates through Lenet. 

So...

I have an input data vector [1 1]. I write the weight matrix coefficients in IP1 to be a 2x2 identity matrix. Hence I expect the  
output of IP1 to be the same as the input vector i.e. [1 1]. 

However, in this setup I get the output as [0.5 0.5]. I tried to shift the values using a bias term. But looks like there is some scaling going on that I don't understand. Can anyone shed some light on the matrix-vector multiplication in the IP layers and how to make sense of it ?  


 This is how I set the weight matrix and bias values. 


layers {

  bottom: "data"

  top: "ip1"

  name: "ip1"

  type: INNER_PRODUCT

  blobs {

    num: 1

    channels: 1

    height: 2 

    width: 2

    data: 1

    data: 0

    data: 0

    data: 1

  } 

  blobs {

    num: 1

    channels: 1

    height: 1 

    width: 2

    data: 0

    data: 0

  } 

  blobs_lr: 1

  blobs_lr: 2

  inner_product_param {

    num_output: 2

    weight_filler {

      type: "xavier"

    } 

    bias_filler {

      type: "constant"

    } 

  } 

Khalid Ashraf

unread,
Oct 21, 2014, 9:25:48 PM10/21/14
to caffe...@googlegroups.com
okay got it. 
Reply all
Reply to author
Forward
0 new messages