Using list.find instead of list.index()
mbartling opened this issue · comments
Pretty sure this is a simple mistake between matlab and python. Should be using list.index
in base.py line 261 in click-cli branch.
(venv) micbar02 @ C02SP20YFVH4 ~/git/tf/rom-demo/utensor-mnist-demo (f/rom-tensor)
└─ $ ▶ utensor-cli convert tensorflow-models/mnist_model/deep_mlp.pb --output-nodes y_pred
/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
2018-09-12 11:56:54.910455: I tensorflow/tools/graph_transforms/transform_graph.cc:318] Applying sort_by_execution_order
Traceback (most recent call last):
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/bin/utensor-cli", line 11, in <module>
load_entry_point('utensor-cgen', 'console_scripts', 'utensor-cli')()
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/src/utensor-cgen/utensor_cgen/cli.py", line 85, in convet_graph
generator.generate(model_path)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/src/utensor-cgen/utensor_cgen/code_generator.py", line 48, in generate
self._generate_from_pb(src_fname)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/src/utensor-cgen/utensor_cgen/code_generator.py", line 71, in _generate_from_pb
ugraph = uTensorGraph(graph_def, self.output_nodes)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/src/utensor-cgen/utensor_cgen/ir/base.py", line 218, in __init__
self._init_from_graph_def(graph, output_nodes)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/src/utensor-cgen/utensor_cgen/ir/base.py", line 348, in _init_from_graph_def
ugraph=self)
File "<attrs generated init 2c40c8c78e6d0c7eddf61ca4dcbd323e4c642a3c>", line 17, in __init__
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/src/utensor-cgen/utensor_cgen/ir/base.py", line 178, in __attrs_post_init__
self.ugraph.add_op(self)
File "/Users/micbar02/git/tf/rom-demo/utensor-mnist-demo/venv/src/utensor-cgen/utensor_cgen/ir/base.py", line 261, in add_op
op_idx = self.topo_order.find(op_name)
AttributeError: 'list' object has no attribute 'find'
I totally missed this one.
I don't see it in the current develop
branch, so I'm closing this issue.
I think we accidentally solve this issue in the previous commits. XD