GithubHelp home page GithubHelp logo

huachao1001 / cnngraph Goto Github PK

View Code? Open in Web Editor NEW
245.0 245.0 89.0 1.95 MB

A tool that automatically extracts network structures from Tensorflow model files

Python 51.40% JavaScript 47.29% HTML 1.31%

cnngraph's Introduction

  • 👋 Hi, I’m @huachao1001
  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...

cnngraph's People

Contributors

huachao1001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cnngraph's Issues

Need change some code if user use python2.7

GraphBuilder.py
`
+# -- coding:utf-8 --
import io
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

def build(self):
change all "open('html/NodeObj.js','r',encoding='utf-8')" as r: with
io.open('html/NodeObj.js','r',encoding='utf-8') as r:
`
add code to MergeLayers.py
+# -- coding:utf-8 --

read_graph.py
replace all list.copy with for-statement

Another problem is that if NN graph is too complicated, the HTML file is seem awkward.

请问在tensorflow2.x的模型中使用报错,要怎么修改

作者您好,看代码的时间,应该是适配tf1.x的,但我现在有个tf2.x的(pb和ckpt),想打印它的结构,打印pb模型的时候报错:
Traceback (most recent call last):
File "read_graph.py", line 189, in
read_graph(model_path,input_names,output_name,html_dst)
File "read_graph.py", line 177, in read_graph
ops = read_graph_from_pb( model_path ,input_names,output_name)
File "read_graph.py", line 25, in read_graph_from_pb
tf.reset_default_graph()
AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'

html error

when i run html, problem happened as follow:
Uncaught TypeError: Cannot read property 'addNode' of undefined
at MergedGraph.mergeOps (dst.html:475)
at MergedGraph.genSvg (dst.html:491)
at changeView (dst.html:555)
at dst.html:560

关于html显示为空的问题

您好,为什么有些模型生成html文件后能正常显示;而有些模型生成的html文件打开后没有内容,程序运行中也没报错,正确生成了html文件。

Help for error!

hello,
I got this error when using your code. I really appreciate you can help me with this error. Thank you!
error:
G[op_name_to_index[inp.op.name]].append(i)
AttributeError: 'NoneType' object has no attribute 'name'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.