summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90b0eb0)
raw | patch | inline | side by side (parent: 90b0eb0)
author | Yangqing Jia <jiayq84@gmail.com> | |
Fri, 27 Sep 2013 17:02:20 +0000 (10:02 -0700) | ||
committer | Yangqing Jia <jiayq84@gmail.com> | |
Fri, 27 Sep 2013 17:02:20 +0000 (10:02 -0700) |
src/caffe/layers/inner_product_layer.cpp | patch | blob | history |
index 115dba756237dd72a51cac862c017dd95cc64f88..e5e8e52a00b2b811675fe7bbd79e4afb9da3d99b 100644 (file)
const Dtype* top_diff = top[0]->cpu_diff();
const Dtype* bottom_data = (*bottom)[0]->cpu_data();
// Gradient with respect to weight
- caffe_cpu_gemm<Dtype>(CblasTrans, CblasNoTrans, K_, N_, M_, (Dtype)1.,
+ caffe_cpu_gemm<Dtype>(CblasTrans, CblasNoTrans, N_, K_, M_, (Dtype)1.,
top_diff, bottom_data, (Dtype)0., this->blobs_[0]->mutable_cpu_diff());
if (biasterm_) {
// Gradient with respect to bias
const Dtype* top_diff = top[0]->gpu_diff();
const Dtype* bottom_data = (*bottom)[0]->gpu_data();
// Gradient with respect to weight
- caffe_gpu_gemm<Dtype>(CblasTrans, CblasNoTrans, K_, N_, M_, (Dtype)1.,
+ caffe_gpu_gemm<Dtype>(CblasTrans, CblasNoTrans, N_, K_, M_, (Dtype)1.,
top_diff, bottom_data, (Dtype)0., this->blobs_[0]->mutable_gpu_diff());
if (biasterm_) {
// Gradient with respect to bias