Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot visualize .pbtxt file #223

Closed
Johnqczhang opened this issue Jan 28, 2019 · 3 comments
Closed

cannot visualize .pbtxt file #223

Johnqczhang opened this issue Jan 28, 2019 · 3 comments

Comments

@Johnqczhang
Copy link

Hi, I'm trying to visualize a network saved in net.pbtxt file which was generated by my caffe2 code using netron of both web browser and MacOS App versions. However, both of them gave me the following error message:

Error loading model. Unsupported file content for extension '.pbtxt' in 'net.pbtxt'.

What am I supposed to do to make it work?

@lutzroeder
Copy link
Owner

lutzroeder commented Jan 28, 2019

The file will load if you rename it to predict_net.pbtxt. Multiple ML formats are using protobuf and protobuf design makes it difficult to detect the file format from contents. Note the file contains a lot of nodes and connections so it might take a very long time to render. A warning is shown for graphs with more than 1500 nodes, this file is close having 1460 nodes (see #68).

lutzroeder added a commit that referenced this issue Jan 28, 2019
@Johnqczhang
Copy link
Author

The file will load if you rename it to predict_net.pbtxt. Multiple ML formats are using protobuf and protobuf design makes it difficult to detect the file format from contents. Note the file contains a lot of nodes and connections so it might take a very long time to render. A warning is shown for graphs with more than 1500 nodes, this file is close having 1460 nodes (see #68).

Thanks a lot!

@Johnqczhang
Copy link
Author

The file uploaded previously was generated by caffe2 when training a model with 2 GPUs so it contains nodes on all GPUs (including gradient ops), which may cause the visualization very clutter. So, I upload a new file predict_net.pbtxt.txt which contains nodes with ops for inference only on single GPU, which can give a clear visualization of the network structure for better understanding. The network was proposed in DensePose as a baseline model, which consists of a ResNet-50 as backbone network and three branches for person detection and dense pose estimation. More details can be found in the paper and its code.

BTW, both uploaded files end with .txt instead of .pbtxt because the latter one is not supported by the github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants