Coder Social home page Coder Social logo

Comments (2)

rashidch avatar rashidch commented on May 11, 2024

In Tensorflow 2.0, you can simply save whole model like keras API by using

model.save('mymodel.h5').

For example;

`

Create and train a new model instance.

model = create_model()
model.fit(train_images, train_labels, epochs=5)

Save the entire model to a HDF5 file.

The '.h5' extension indicates that the model shuold be saved to HDF5.

model.save('my_model.h5')

Recreate the exact same model, including its weights and the optimizer

new_model = tf.keras.models.load_model('my_model.h5')

Show the model architecture

new_model.summary()
`

Check Tensorlfow 2.o tutorial for details: https://www.tensorflow.org/tutorials/keras/save_and_load

from tensorflow2.0-examples.

pp1bb avatar pp1bb commented on May 11, 2024

in this code i can not save .h5 only save ckpt why?

from tensorflow2.0-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.