| 275 | |
| 276 | template <typename Dtype> |
| 277 | void RecurrentLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top, |
| 278 | const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) { |
| 279 | CHECK(!propagate_down[1]) << "Cannot backpropagate to sequence indicators."; |
| 280 | |
| 281 | // TODO: skip backpropagation to inputs and parameters inside the unrolled |
| 282 | // net according to propagate_down[0] and propagate_down[2]. For now just |
| 283 | // backprop to inputs and parameters unconditionally, as either the inputs or |
| 284 | // the parameters do need backward (or Net would have set |
| 285 | // layer_needs_backward_[i] == false for this layer). |
| 286 | unrolled_net_->BackwardFrom(last_layer_index_); |
| 287 | } |
| 288 | |
| 289 | #ifdef CPU_ONLY |
| 290 | STUB_GPU_FORWARD(RecurrentLayer, Forward); |
nothing calls this directly
no test coverage detected