titu1994 / DenseNet

DenseNet implementation in Keras
MIT License
707 stars 294 forks source link

AttributeError: 'NoneType' object has no attribute 'get_file' #50

Closed smiler96 closed 5 years ago

smiler96 commented 5 years ago
Traceback (most recent call last):
  File "D:/GitHub/DenseNet-master/imagenet_inference.py", line 26, in <module>
    print('Predicted:', decode_predictions(preds))
  File "C:\softwares\Anaconda3\envs\Keras\lib\site-packages\keras_applications\imagenet_utils.py", line 224, in decode_predictions
    fpath = keras_utils.get_file(
AttributeError: 'NoneType' object has no attribute 'get_file'

kereas 2.2.4, what's the bug of this? How should i do for this bug? Thanks for you!

gdbb commented 5 years ago
Traceback (most recent call last):
  File "D:/GitHub/DenseNet-master/imagenet_inference.py", line 26, in <module>
    print('Predicted:', decode_predictions(preds))
  File "C:\softwares\Anaconda3\envs\Keras\lib\site-packages\keras_applications\imagenet_utils.py", line 224, in decode_predictions
    fpath = keras_utils.get_file(
AttributeError: 'NoneType' object has no attribute 'get_file'

kereas 2.2.4, what's the bug of this? How should i do for this bug? Thanks for you!

In file "imagenet_inference.py", you could replace "from densenet import decode_predictions" with "from keras.applications.imagenet_utils import decode_predictions".

titu1994 commented 5 years ago

This is correct fix. Keras keeps changing stuff with every release. I'll patch this in some time.