| 82 | |
| 83 | template <typename Dtype> |
| 84 | void InnerProductLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom, |
| 85 | const vector<Blob<Dtype>*>& top) { |
| 86 | const Dtype* bottom_data = bottom[0]->cpu_data(); |
| 87 | Dtype* top_data = top[0]->mutable_cpu_data(); |
| 88 | const Dtype* weight = this->blobs_[0]->cpu_data(); |
| 89 | caffe_cpu_gemm<Dtype>(CblasNoTrans, transpose_ ? CblasNoTrans : CblasTrans, |
| 90 | M_, N_, K_, (Dtype)1., |
| 91 | bottom_data, weight, (Dtype)0., top_data); |
| 92 | if (bias_term_) { |
| 93 | caffe_cpu_gemm<Dtype>(CblasNoTrans, CblasNoTrans, M_, N_, 1, (Dtype)1., |
| 94 | bias_multiplier_.cpu_data(), |
| 95 | this->blobs_[1]->cpu_data(), (Dtype)1., top_data); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | template <typename Dtype> |
| 100 | void InnerProductLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top, |
nothing calls this directly
no test coverage detected