Closed zoeveryday closed 5 years ago
In filter pruner I edited that line as from libs.graph_utils import GraphTraversalState and I see the same Key Error.
I removed "from graph_utils import GraphTraversalState" and changed line 378 : self.state = GraphTraversalState(already_visited={}, output_node_stack=[]) with: self.state = graph_utils.GraphTraversalState(already_visited={}, output_node_stack=[]) I have the same error.
@zoeveryday @smohan10 @julienip Hey guys, I am super sorry for the slow response. I have been away for awhile and had not had the chance to stay updated with the project as you all started using it.
Some others in another thread also had similar issues. I believe the KeyError
you all were having was related to improper node names defined in the compression configs. I went through the whole codebase this week and fixed various bugs related to the compression process you all are having, which is reflected in 42c6bbe.
As a quick note: that the variable names have changed in the latest update to avoid the weird Prediction/postrain
vsPrediction/pretrain
convention I had when naming the PSPNet and ICNet output nodes. This is reflected in the updated models in the ModelZoo. If you have your own older checkpoints and want to use the updated codebase, you can also rename the nodes in your Tensorflow Checkpoints like I did. I used a simple name conversion script to do this which I found here. I rename CascadeFeatureFusion_0
-> CascadeFeatureFusion
and *Predictions/postrain
-> Predictions/Conv
(for fine-tuning from PSPNEt, ICNet ignores all `Predictions` nodes)**.
@zoeveryday I will close this issue for now, but if any of you still have this issue after updated to 42c6bbe please re-open the issue and I will work through it. I will make sure to be much quicker with responses (also feel free to shoot me an email).
oandrienko:
Thanks for your nice work on this.
I am following the instructions on "Training ICNet with Tensorflow", in Stage 2 - Compression and Retraining, I got and error as below while trying to run script
python3 compress.py...
File "/home/work/×××/fast-semantic-segmentation/libs/filter_pruner.py", line 24, in <module> from graph_utils import GraphTraversalState ModuleNotFoundError: No module named 'graph_utils'
I tried to comment out LINE24, and re-run the script, and it gave me following errors...
I am using python3.6.7 and tensorflow1.5.0 with CUDA9.1.
Any suggestion on how to fix this kind of issues? Thanks in advance.