PyImageSearch / Deep-Learning-for-Computer-Vision-with-Python

2 stars 1 forks source link

I am having reshape issue on Practical Bundle Deep learning chapter 10 extract_features.py line 95 #17

Closed asil07 closed 2 years ago

asil07 commented 2 years ago

Please use this template while reporting bugs inside DL4CV. Issues related to personal project questions or code that we haven't authored will automatically be closed.

Are you using one of our development environments?

We provide a preconfigured AWS AMI and a VM to help our customers skip the environment setup part and jump straight to development. We highly suggest using one of our development environments to run our code.

If the issue is not related to code, then you can simply skip this question.

If you are using your own development environment then please provide the following details.

Describe the issue

I am having reshape issue on Practical Bundle Deep learning chapter 10 extract_features.py line 95

ValueError: cannot reshape array of size 1605632 into shape (16,2048)

Please be clear and concise. Don't forget to include the Bundle and chapter names where you have found issues.

Any other information

vikaskookna commented 2 years ago

@asil07 In Keras v2.2.0 and greater, the output dimensions of ResNet is 2, 048 × 7 × 7 = 100, 352 rather than previous versions which were 2, 048. If you are using a version of Keras prior to v2.2.0+ make sure you update the 100352 in both the .reshape and HDF5DatasetWriter calls above to be 2048.

asil07 commented 2 years ago

thank you that helped