how to sending the label data of lstm

42 views
Skip to first unread message

jeremy chang

unread,
Dec 22, 2016, 2:28:10 AM12/22/16
to Caffe Users
Hi
I am using jeffdonahue 's lstm right now
I wan to ask if my input layer is like this
input:"data"
input_shape:{dim:10 dim:100 dim:1}
input:"indicator"
input_shape:{dim:10 dim:100}

meaning that I have 100 independent sequences
each have 10 time steps
and for each time step
there is a corresponding output(label)

and the rest of the net is
layer {
    name: "lstm1"
type: "LSTM"
bottom: "data"
bottom: "indicator"
    top: "lstm1"
recurrent_param{
  num_output: 20
 weight_filler {
      type: "gaussian"
      std: 0.1
    }
    bias_filler {
      type: "constant"
 value: 1
    }
}
}

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

    inner_product_param {
    num_output: 1
    weight_filler {
      type: "gaussian"
      std: 0.1
    }
    bias_filler {
      type: "constant"
 value: 1
    }
  }
}

layer {
  name: "loss"
  type: "EuclideanLoss"
  bottom: "ip1"
  bottom: "label"
  top: "loss"
  #include: { phase: TRAIN }
}

"label" is the target output
in this case
how do I setting the "label" data so each training date(each step in each sequence)
can have its corresponding target output(label)?

thanks!


Reply all
Reply to author
Forward
0 new messages