Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I access the kernel_height from Blob in a function? #3384

Closed
acgtyrant opened this issue Nov 25, 2015 · 1 comment
Closed

How do I access the kernel_height from Blob in a function? #3384

acgtyrant opened this issue Nov 25, 2015 · 1 comment

Comments

@acgtyrant
Copy link

I want to use the Fully Convolution Network, 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:

template <typename Dtype>
DiagonalAffineMap<Dtype> FilterMap(const int kernel_h, const int kernel_w,
    const int stride_h, const int stride_w, const int pad_h, const int pad_w) 

But 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!

@acgtyrant
Copy link
Author

I find some useful functions like shape(int axes) in blob.hpp, sorry for that I make a stupid question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant