Skip to content

add support for tensorflow.keras API #21

@evdem

Description

@evdem

I get "TypeError: init() got an unexpected keyword argument 'ragged'" for
model = tf.keras.applications.MobileNet(input_shape=IMG_SHAPE, include_top=True, weights='imagenet')
model_reduced = reduce_keras_model(model)

See https://stackoverflow.com/questions/58878421/unexpected-keyword-argument-ragged-in-keras "...model you have exported is from tensorflow.keras and not directly from keras API. These two are different. So while loading it might be using tf.ragged tensors that might not be compatible with keras API...".
They suggest change 'from keras...' to 'from tensorflow.keras...'

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