Git Product home page Git Product logo

Comments (12)

Thenerdstation avatar Thenerdstation commented on May 3, 2024 2

Ok cool so we have a TensorNetwork -> graphviz.Graph shim working. I think this will be a good enough for now.

It would also be cool to have a gif generator so you can visualize the contraction order of the network.

from tensornetwork.

Thenerdstation avatar Thenerdstation commented on May 3, 2024 1

Keep it open, we'll use it to track progress

from tensornetwork.

AdrianFRadulescu avatar AdrianFRadulescu commented on May 3, 2024 1

The current version does not seem to support net = tensornetwork.TensorNetwork(),
so how can I visualize the network from a set of nodes I created?

from tensornetwork.

Thenerdstation avatar Thenerdstation commented on May 3, 2024

Not yet, but we definitely should add one soon!

We plan on integrating with networkx for now. That way you can easily view the network visualization inside of a colab/Jupiter notebook. We have a PR from a (recently) exintern who did network visualization of "tree like" networks, but we should definitely extend it to arbitrary networks.

Doing an integration into tensorboard would be great, but we have no plans of doing that yet.

from tensornetwork.

imatsuzaki avatar imatsuzaki commented on May 3, 2024

We plan on integrating with nxgraph for now. That way you can easily view the network visualization inside of a colab/Jupiter notebook.

That's great!
It will be helpful to construct tensor network!
Looking forward to PR and release.
I think integrating with nxgraph will be enough.

Should I close this issue?

from tensornetwork.

stavros11 avatar stavros11 commented on May 3, 2024

Thanks for raising this issue, I also think should stay open until a general solution is found. Regarding the networkx visualization, I have a jupyter notebook with some example visualizations on my PR that you can check if you like.

A problem with this implementation is that I code explicitly the coordinates of each node in the graph which might be hard to do for arbitrary networks. For trees it is possible to find the levels with a BFS but I cannot think of a general way to define coordinates. I do not have much experience on graph plotting but perhaps there are ways or libraries to do a plot that looks reasonably well automatically, without having to code every coordinate. This might be worth checking. Also, I would find nice to have interactive graphs, where you can click a node and hide/show the nodes connected to it. I think that Tensorboard might be able to do this.

from tensornetwork.

Thenerdstation avatar Thenerdstation commented on May 3, 2024

*nxgraph-> networkx.

Sorry, I wrote the wrong name

from tensornetwork.

imatsuzaki avatar imatsuzaki commented on May 3, 2024

I appreciate discussing about visualization, and also looking forward to PR.

I do not also have much experience on graph, but graphviz can be helpful to create interactive tensor network visualization.

Implementing tensorboard visualization may be hard because it is based on tensorflow graph, and it is not suitable to this library because of other runtime, like JAX.

from tensornetwork.

stared avatar stared commented on May 3, 2024

I would be happy to help with working on a tensor viz (vide my interest in tensor diagrams).

There is a super-simple thing in JSFiddle, with D3.js (https://jsfiddle.net/stared/8huz5gy7/):

Screenshot 2019-06-14 12 58 41

However, for a general one I would like to make sure:

  • it is possible to have different types of tensors (e.g. some have a tensor structure (e.g. sample x channel x width x height), some graphics may be good to indicate different symmetries of tensors, etc)
  • most likely in Vue.js or something more modular than D3.js (though, I am open to suggestions)

from tensornetwork.

Thenerdstation avatar Thenerdstation commented on May 3, 2024

Hey that'd be awesome! We'd welcome a PR for this. I'm not a JS developer, so really anything that looks nice would be ok by me.

If you want to make a JS visualization tool, go ahead and make a new directory under visualization/js/.

from tensornetwork.

Thenerdstation avatar Thenerdstation commented on May 3, 2024

0.0.4 is out now. You can use g = tensornetwork.to_graphviz(net) to create an isomorphic graphviz object. From there you can pretty easily see the visualization.

from tensornetwork.

Thenerdstation avatar Thenerdstation commented on May 3, 2024

Sorry for the late response!

To visialize the graph in the latest API, you can simple do

tn.to_graphvis(list_of_nodes)

from tensornetwork.

Related Issues (20)

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.