Skip to content

Import error for Keras pre trained models in monk  #144

@Ayush6459

Description

@Ayush6459

hii , I am trying to use monk for Keras prototype for pre-trained image classification models like resent50 but the backend is giving me error like this :

ImportError Traceback (most recent call last)
in ()
----> 1 ptf.Default(dataset_path=["./dataset/train", "./dataset/val"], model_name="resnet50", freeze_base_network=True, num_epochs=5);

11 frames
/usr/local/lib/python3.7/dist-packages/monk/tf_keras_1/models/models.py in get_base_model(model_name, use_pretrained, num_classes, freeze_base_network, input_size)
62 from keras.applications import NASNetLarge as keras_model
63 elif(model_name == "resnet50"):
---> 64 from keras.applications import ResNet50 as keras_model
65 elif(model_name == "resnet101"):
66 from keras.applications import ResNet101 as keras_model

ImportError: cannot import name 'ResNet50' from 'keras.applications' (/usr/local/lib/python3.7/dist-packages/keras/applications/init.py)


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

I am using monk in Colab , Please see the issue .

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