[Python] Converting tensorflow model using tensorflowjs

Discussão em 'Python' iniciado por Stack, Janeiro 3, 2025.

  1. Stack

    Stack Membro Participativo

    Trying to convert a simple CNN using tfjs. The model gets converted, however it does not get loaded in properly. Error: 'An InputLayer should be passed either a batchInputShape or an inputShape.'

    tf.saved_model.save(model, 'my_model')

    import tensorflowjs as tfjs
    tfjs.converters.save_keras_model(model, 'tfjs')


    I have tried converting the model from both .h5 and .keras formats. Sometimes I get a different error on the model configuration. A few months ago I converted some similar models and never had any problems. Anyone got an idea?

    Continue reading...

Compartilhe esta Página