{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/3384","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/3384/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/3384/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/3384/events","html_url":"https://github.com/BVLC/caffe/issues/3384","id":118787036,"number":3384,"title":"How do I access the `kernel_height` from Blob in a function?","user":{"login":"acgtyrant","id":3921062,"avatar_url":"https://avatars.githubusercontent.com/u/3921062?v=3","gravatar_id":"","url":"https://api.github.com/users/acgtyrant","html_url":"https://github.com/acgtyrant","followers_url":"https://api.github.com/users/acgtyrant/followers","following_url":"https://api.github.com/users/acgtyrant/following{/other_user}","gists_url":"https://api.github.com/users/acgtyrant/gists{/gist_id}","starred_url":"https://api.github.com/users/acgtyrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acgtyrant/subscriptions","organizations_url":"https://api.github.com/users/acgtyrant/orgs","repos_url":"https://api.github.com/users/acgtyrant/repos","events_url":"https://api.github.com/users/acgtyrant/events{/privacy}","received_events_url":"https://api.github.com/users/acgtyrant/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-25T08:45:19Z","updated_at":"2015-11-26T06:35:05Z","closed_at":"2015-11-26T06:35:05Z","body":"I want to use the [Fully Convolution Network](http://www.cs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf), so I find the #1976 and start to factory it to make a new pull request. However, I find the original protected variable `kernel_height` and `kernel_weight` is replaced by `Blob<int>::shape_[2]` and `Blob<int>::shape_[3]` in `vision_layer.h`. So I have to change [the function declaration](https://github.com/BVLC/caffe/pull/1976/files#diff-86b27dca66daa2f95748b5e33221b6fdR49):\r\n\r\n\ttemplate <typename Dtype>\r\n\tDiagonalAffineMap<Dtype> FilterMap(const int kernel_h, const int kernel_w,\r\n\t    const int stride_h, const int stride_w, const int pad_h, const int pad_w) \r\n\r\nBut I find the `Blob<int>::shape_` is a protected variable, I can not access it immediately, so any idea? Declare the function as friend? Thank you!"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/159821700","html_url":"https://github.com/BVLC/caffe/issues/3384#issuecomment-159821700","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/3384","id":159821700,"user":{"login":"acgtyrant","id":3921062,"avatar_url":"https://avatars.githubusercontent.com/u/3921062?v=3","gravatar_id":"","url":"https://api.github.com/users/acgtyrant","html_url":"https://github.com/acgtyrant","followers_url":"https://api.github.com/users/acgtyrant/followers","following_url":"https://api.github.com/users/acgtyrant/following{/other_user}","gists_url":"https://api.github.com/users/acgtyrant/gists{/gist_id}","starred_url":"https://api.github.com/users/acgtyrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acgtyrant/subscriptions","organizations_url":"https://api.github.com/users/acgtyrant/orgs","repos_url":"https://api.github.com/users/acgtyrant/repos","events_url":"https://api.github.com/users/acgtyrant/events{/privacy}","received_events_url":"https://api.github.com/users/acgtyrant/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T06:35:05Z","updated_at":"2015-11-26T06:35:05Z","body":"I find some useful functions like `shape(int axes)` in `blob.hpp`, sorry for that I make a stupid question."}}