[Python] errors while saving lstm model in .h5 format as well as .keras format

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

  1. Stack

    Stack Membro Participativo

    I'm creating a lstm model that will detect ddos attack in a sdn environment and while saving the model in .h5 format I'm getting this error


    ValueError: Unrecognized keyword arguments: ['batch_shape']
    ​

    even when I didn't use batch_shape in my code, so I then saved my model as .keras format but again getting an error message


    OSError: Unable to synchronously open file (file signature not found)
    ​

    The image is how I'm defining my model

    I'm using Python 3.9 and tensorflow 2.11.0 and keras 2.11.0.

    How can I resolve my problem?

    Continue reading...

Compartilhe esta Página