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"
}
}
}