Skip to content Skip to sidebar Skip to footer

Getting Error While Converting Model Into Pb File For Android

I am getting this error: frozen_graph = freeze_graph(K.get_session(), output_names=[model.output.op.name]) TypeError: 'module' object is not callable I am using tensorflow versio

Solution 1:

You did not include the full code but let me guess, your have an import statement that looks like this:

from tensorflow.tools import freeze_graph

It should be:

from tensorflow.tools.freeze_graph import freeze_graph

This is because the freeze_graph function actually lives in a module that is called freeze_graph as well. The import statement you used import the whole module. When your code reaches the freeze_graph part is, quite accurately, errors out saying modules are not callable :)


Post a Comment for "Getting Error While Converting Model Into Pb File For Android"