Keras-retinanet: AttributeError: 'module' object has no attribute 'imagenet_utils'

Created on 7 Jun 2018  Â·  5Comments  Â·  Source: fizyr/keras-retinanet

Hi,

I am training using csv files on a custom dataset and when I start training I am getting the following error:

Traceback (most recent call last):
File "keras_retinanet/bin/train.py", line 442, in <module>
main()
File "keras_retinanet/bin/train.py", line 401, in main
weights = backbone.download_imagenet()
File "keras_retinanet/bin/../../keras_retinanet/models/resnet.py", line 50, in download_imagenet
return keras.applications.imagenet_utils.get_file(
AttributeError: 'module' object has no attribute 'imagenet_utils'

Most helpful comment

Thank you, i have resolved it by adding
import keras.applications.imagenet_utils
in resnet.py @Lakshya-Kejriwal

All 5 comments

Hmm what Keras version are you using? Can you check if your Keras contains
this file:
https://github.com/keras-team/keras/blob/master/keras/applications/imagenet_utils.py

On Thu, 7 Jun 2018, 22:26 Lakshya Kejriwal, notifications@github.com
wrote:

Hi,

I am training using csv files on a custom dataset and when I start
training I am getting the following error:

Traceback (most recent call last):
File "keras_retinanet/bin/train.py", line 442, in
main()
File "keras_retinanet/bin/train.py", line 401, in main
weights = backbone.download_imagenet()
File "keras_retinanet/bin/../../keras_retinanet/models/resnet.py", line
50, in download_imagenet
return keras.applications.imagenet_utils.get_file(
AttributeError: 'module' object has no attribute 'imagenet_utils'

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fizyr/keras-retinanet/issues/494, or mute the thread
https://github.com/notifications/unsubscribe-auth/AArtan25XNeW4YMmUxqg04lpAlko4GCtks5t6YxmgaJpZM4UfEA5
.

My keras version is 2.2.0

It had that file. I solved it by first importing the module imagenet_utils in resnet.py. No idea why it behaved in such a way

I see, Keras 2.2.0 was released.. for now, it's easiest to stick to Keras
2.1.6 until compatibility is fixed.

On Thu, 7 Jun 2018, 22:45 Lakshya Kejriwal, notifications@github.com
wrote:

It had that file. I solved it by first importing the module imagenet_utils
in resnet.py. No idea why it behaved in such a way

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fizyr/keras-retinanet/issues/494#issuecomment-395558802,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AArtajMsfQFt_kVb35xikUF4dsdS-pc4ks5t6ZDQgaJpZM4UfEA5
.

Thank you, i have resolved it by adding
import keras.applications.imagenet_utils
in resnet.py @Lakshya-Kejriwal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ztf-ucas picture ztf-ucas  Â·  3Comments

madingx picture madingx  Â·  5Comments

sumeetssaurav picture sumeetssaurav  Â·  4Comments

fernandocamargoti picture fernandocamargoti  Â·  4Comments

penguinmenac3 picture penguinmenac3  Â·  5Comments