Skip to content

Update according to Keras 3 #16

@muellerdo

Description

@muellerdo

Hi,

first, thank you for this wonderful package! :)

Since September 2023, Keras has updated to Keras 3 and restructured some of its code base:
https://github.com/keras-team/keras/tree/b9be76a13a1edbea5e17a54bf91da386323222bf/keras

Sadly, due to their updates, the classification_models_3D code is not working anymore on the latest tensorflow/keras version, because the keras.engine submodule does not exist anymore but is required in multiple architectures of classification-models-3D.

See attached the error log:

---------------------------------------------------------------------------

ModuleNotFoundError                       Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/classification_models_3D/models_factory.py](https://localhost:8080/#) in <module>
     12 from .models import mobilenet as mb1
     13 from .models import mobilenet_v2 as mb2
---> 14 from .models import efficientnet as eff
     15 from .models import efficientnet_v2 as eff2
     16 from .models import convnext as next

[/usr/local/lib/python3.10/dist-packages/classification_models_3D/models/efficientnet.py](https://localhost:8080/#) in <module>
     32 from keras.applications import imagenet_utils
---> 33 from keras.engine import training
     34 from keras.layers import VersionAwareLayers
     35 from keras.utils import data_utils

ModuleNotFoundError: No module named 'keras.engine'

Thank you for your time!

Cheers,
Dominik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions