Comments (7)
Yes - NetVLAD is not a standard layer so it is not included in MatConvNet by default. It is a custom layer implemented as a class, so you are missing one of these two things (or both):
-
You need to download the NetVLAD code and make sure it is in the path. Otherwise Matlab won't know how to load the objects from the mat file and will leave the custom layers empty.
-
Because these layers are implemented as classes, they are not struct's but objects. So your code won't work -not sure what will cell2mat do, and isfield only works for struct's and returns false otherwise https://www.mathworks.com/help/matlab/ref/isfield.html , use isprop for objects https://www.mathworks.com/help/matlab/ref/isprop.html . As far as I know all MatConvNet layers have .name so you don't need to check for that, you probably checked because you found some empty layers due to (1.).
from netvlad.
So, where are the weights for the netvlad layer stored? I wish to access those.
from netvlad.
If you download the NetVLAD code and make sure it is in the path, loading the network from the mat file will work instead of producing some empty layers. Then you can examine the loaded NetVLAD layer and access it's weights. E.g. net.layers{31}.weights
from netvlad.
I run your demo code, computeRepresentation.m
and attempt to look at the weights.
under vlad:core
I see only 2 weights, both are of dimensions (1, 1, 512, 64)
. But I was expecting to see 3 sets of weights for the NetVLAD layer as mentioned in your netvlad paper.
Am correct in assuming that the bias is not trained in this case?
from netvlad.
Yes, layerVLAD.m code is without bias while layerVLADv2.m is with bias (we mentioned on arXiv appendix that we fix the bias, but it seems we accidentally dropped it from the v3 version of the paper). For the setting in the paper, there is not much difference between the two, and the reason is that input features are L2 normalized in which case you can do the assignment with a simple scalar product and don't need bias (e.g. see the assignment equation 2, expand it and assume |xi|=1 and |ck|=1, then you don't get any bias terms as they all cancel out). If they were not L2 normalized, the two are not similar and layerVLADv2 should probably be used (but this is just theory, I don't know if it is needed in practice).
from netvlad.
Ok, I get your point. How about the BatchNormalization? Is this network finetuned from the ImageNet VGG without batchnorm updates?
from netvlad.
As you can see from your list of layers - there are no batch norm layers in the original VGG network
from netvlad.
Related Issues (20)
- the TokyoTM database HOT 2
- pitts30k datasets HOT 9
- pitts30k datasets HOT 1
- Dataset of NetVLAD HOT 1
- Applying to Indoor usage HOT 2
- about Pittsburgh 250k dataset HOT 1
- Link to download Pittsburgh 250k: available on request here showing invalid link HOT 11
- Converting MATLAB trained model .mat files (off the shelf and trained on Pittsburg 30k) in Pytorch HOT 1
- Pitts30k datasets HOT 1
- NetVLAD effectiveness in Gazebo Environments HOT 3
- Questions about Pitts250k dataset panoramic image splitting HOT 1
- How to run the Trained Network Matlab HOT 1
- using in real time application HOT 1
- About demo test HOT 4
- some problem of dem.m HOT 14
- What is the difference between these two NetVLAD programs? HOT 4
- Where can I get Pitts250k data? HOT 1
- Pitts30k Datasets! HOT 1
- About datasets HOT 1
- Is it possible to convert to ONNX format? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netvlad.