What is a trackable object?

Issue

I’m browsing the documentation around SavedModels, and tf.saved_model.save (docs) does:

Exports the Trackable object obj to SavedModel format.

What is a trackable object, I have not been able to find anything regarding this. Except for my PyCharm debugger printing it.


I am reading the documentation because I need to understand how SavedModels work. I’ve tried to load some SavedModels and subsequently convert these to TensorFlow lite/ coreML. Things are not going well in this respect, and I’m completely lost there so I won’t bother mentioning it much detail in this question.

Solution

I also had the same question and I looked for the answer. Here is the answer. Directly quoting from the documentation:

TensorFlow objects may contain trackable state, such as tf.Variables, tf.keras.optimizers.Optimizer implementations, tf.data.Dataset iterators, tf.keras.Layer implementations, or tf.keras.Model implementations. These are called trackable objects.

Answered By – M.Innat

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published