Skip to content

AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering' #106

@chrisspen

Description

@chrisspen

Running one of the example files:

 kur -v train speech.yml

returns the error:

Traceback (most recent call last):
  File "~/myproject/env/bin/kur", line 8, in <module>
    sys.exit(main())
  File "~/myproject/env/lib/python3.7/site-packages/kur/__main__.py", line 492, in main
    sys.exit(args.func(args) or 0)
  File "~/myproject/env/lib/python3.7/site-packages/kur/__main__.py", line 63, in train
    func = spec.get_training_function()
  File "~/myproject/env/lib/python3.7/site-packages/kur/kurfile.py", line 392, in get_training_function
    model = self.get_model(provider)
  File "~/myproject/env/lib/python3.7/site-packages/kur/kurfile.py", line 173, in get_model
    backend=self.get_backend(),
  File "~/myproject/env/lib/python3.7/site-packages/kur/kurfile.py", line 200, in get_backend
    (self.data.get('settings') or {}).get('backend')
  File "~/myproject/env/lib/python3.7/site-packages/kur/backend/backend.py", line 285, in from_specification
    result = target(**params)
  File "~/myproject/env/lib/python3.7/site-packages/kur/backend/keras_backend.py", line 195, in __init__
    keras.backend.set_image_dim_ordering('tf')
AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering'

I'm using Python 3.7 and tensorflow (cpu) and tensorflow==2.0.0. I've seen similar errors before in other projects, and it's usually due to incompatible versions, since tensorflow 2.0.0 introduced a lot of backwards incompatible changes. Can I assume Kur doesn't yet support Tensorflow 2.0.0? If so, which version of Tensorflow is supported? Neither the README nor setup.py specify the compatible version numbers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions