OSError: Unable to open file (truncated file: eof = 1277952, sblock->base_addr = 0, stored_eof = 17225924)

0 votes

Hi Guys,

I am trying to load imagenet weights for my CNN model. But it gives me the below error.

MobileNet = MobileNet(weights = 'imagenet',  include_top = False, input_shape = (img_rows, img_cols, 3))
OSError: Unable to open file (truncated file: eof = 1277952, sblock->base_addr = 0, stored_eof = 17225924)

How can I solve this error?

May 18 in Machine Learning by akhtar
• 24,830 points
408 views

1 answer to this question.

0 votes

Hi@akhtar,

You may get this error if your model weights are corrupted. To avoid this error you can manually remove your downloaded weights from your keras folder. After that you can able to run your command. 

answered May 18 by MD
• 55,740 points

Related Questions In Machine Learning

0 votes
1 answer

Example to run KNN algorithm using python

Have a look at this one: from sklearn.datasets ...READ MORE

answered May 8, 2019 in Machine Learning by Harvy
460 views
0 votes
1 answer
+1 vote
2 answers

ValueError: Not enough values to unpack

Make the following changes in your script, ...READ MORE

answered Jun 24, 2019 in Machine Learning by Omkar
• 69,030 points
9,790 views
0 votes
1 answer

How to compare expected and predicted values?

The predict() function returns a plain numpy ...READ MORE

answered Jul 13, 2019 in Machine Learning by Tina
427 views
0 votes
1 answer

ImportError: `load_weights` requires h5py.

Hi@akhtar, You are trying to use pre-created weight of ...READ MORE

answered May 18 in Machine Learning by MD
• 55,740 points
257 views
0 votes
1 answer

What is h5 model in Keras?

Hi@akhtar, H5 is a file format to store ...READ MORE

answered Jul 14 in Machine Learning by MD
• 55,740 points
193 views
0 votes
1 answer

How to load a model from an HDF5 file in Keras?

Hi@akhtar, If you stored the complete model, not ...READ MORE

answered Jul 14 in Machine Learning by MD
• 55,740 points
208 views
0 votes
1 answer

not able to see all columns and rows of a pandas DataFrame?

Hi@akhtar, Your data set contains lots of rows ...READ MORE

answered Apr 8 in Machine Learning by MD
• 55,740 points
501 views