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 version 1.15.0 with keras 2.0.5
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 :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.