-
Notifications
You must be signed in to change notification settings - Fork 134
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
h5py/h5f.pyx in h5py.h5f.open() OSError: Unable to open file (file signature not found) #25
Comments
You need to download VGG weights as said in models/CNN/README.md |
Replace the get_image_features function with below: def get_image_model(CNN_weights_file_name): |
The download link is broken while trying to download vgg16_weights.h5 . PLEASE CHECK README HERE: |
I have updated the link. Try now.
Thanks and Regards
Adi
…On Wed, Sep 22, 2021 at 3:04 PM Aryan Gupta ***@***.***> wrote:
The download link is broken while trying to download vgg16_weights.h5 .
PLEASE CHECK README HERE:
https://github.com/iamaaditya/VQA_Demo/tree/master/models/CNN
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOTJ4T6J67LSQOHMOFIT2DUDISCXANCNFSM4GWLVHZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I'm running on Google colab, I'm getting the following error It occurred while I tried to execute the below code It happened when I tried load the pretrained json configuration file along with weights file present inside the VGG folder.
`def get_VQA_model(VQA_model_file_name, VQA_weights_file_name):
|
While running a code, we are receiving below error. Please help me out.
OSError Traceback (most recent call last)
in ()
85
86 if name == "main":
---> 87 main()
in main()
81
82 if verbose : print("\n\n\nLoading image features ...")
---> 83 image_features = get_image_features(args.image_file_name, CNN_weights_file_name)
84
85
in get_image_features(image_file_name, CNN_weights_file_name)
65 print('call image features middle')
66 print(CNN_weights_file_name)
---> 67 image_features[0,:] = get_image_model(CNN_weights_file_name).predict(im)[0]
68 return image_features
69
in get_image_model(CNN_weights_file_name)
27 print(CNN_weights_file_name)
28
---> 29 image_model = VGG_16(CNN_weights_file_name)
30
31 # this is standard VGG 16 without the last two layers
/content/drive/My Drive/VQA_Demo/models/CNN/VGG.py in VGG_16(weights_path)
99 model.add(Dense(1000, activation='softmax'))
100
--> 101 if weights_path:
102 # model.load_weights(weights_path)
103 load_model_legacy(model, weights_path)
/content/drive/My Drive/VQA_Demo/models/CNN/VGG.py in load_model_legacy(model, weight_path)
33 ''' this function is used because the weights in this model
34 were trained with legacy keras. New keras does not support loading these weights '''
---> 35
36 import h5py
37 f = h5py.File(weight_path, mode='r')
/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py in init(self, name, mode, driver, libver, userblock_size, swmr, **kwds)
310 with phil:
311 fapl = make_fapl(driver, libver, **kwds)
--> 312 fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
313
314 if swmr_support:
/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py in make_fid(name, mode, userblock_size, fapl, fcpl, swmr)
140 if swmr and swmr_support:
141 flags |= h5f.ACC_SWMR_READ
--> 142 fid = h5f.open(name, flags, fapl=fapl)
143 elif mode == 'r+':
144 fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/h5f.pyx in h5py.h5f.open()
OSError: Unable to open file (file signature not found)
The text was updated successfully, but these errors were encountered: