I think features are not being written in vgg file. I tried running "py_caffe_feat_extract.py" using both the codes you provided in matlab_features_reference and python_features folders separately. By both, I am getting same sized file. Please help me in CNN feature extraction from images.