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

The order of the fc layers #47

Closed
Edwardmark opened this issue Jun 20, 2017 · 2 comments
Closed

The order of the fc layers #47

Edwardmark opened this issue Jun 20, 2017 · 2 comments
Labels

Comments

@Edwardmark
Copy link

Do you know how to load the fully-connected layers as you load the conv layers
is the following still true for fully-connected layers?

matconvnet: weights are [width, height, in_channels, out_channels]

tensorflow: weights are [height, width, in_channels, out_channels]

the output of pool5 with a image with shape[1,224,224,3] is [1,7,7,512], and the fc6 weight is [7,7,512,4096], so how to flatten the weight in matconvnet to fit the format of tensorflow?

@shekkizh
Copy link
Owner

shekkizh commented Jul 3, 2017

fully connected layers should have shape [input_size, output_size]. I don't think you need to perform any changes to convert to tf format.

In your example I think the fc6 weights will be of shape [7x 7x512, 4096].

@Edwardmark
Copy link
Author

@shekkizh I know what you mean,but should we first change the order of the first two dimension of fc6 weight and then flatten that?

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

No branches or pull requests

2 participants