junhyukoh / caffe-lstm

LSTM implementation on Caffe
Other
493 stars 250 forks source link

Loss layer calculation #16

Open aurotripathy opened 8 years ago

aurotripathy commented 8 years ago

Hi Junhyuk, your training regime learns fine.

Can you please shed some light on how the loss is calculated.

Is it calculated based on the output of a single label value or the entire 320 label values?

I ask because the ip1 layer has num_output as 1 (shown below)

Thank you.

layer {
  name: "ip1"
  type: "InnerProduct"
  bottom: "lstm1"
  top: "ip1"

  inner_product_param {
    num_output: 1
    weight_filler {
      type: "gaussian"
      std: 0.1
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "loss"
  type: "EuclideanLoss"
  bottom: "ip1"
  bottom: "label"
  top: "loss"
  include: { phase: TRAIN }
}