By 'standard format' I mean where the input and output nodes are in their own separate lines, with all other hidden nodes between them in the image. As you can see below, my input nodes are nodes 0,1,and 2, my output node is 3, my hidden nodes are 4 and 5. This is the best looking network graph I can get. I'm trying to avoid using keras because its been a huge pain trying to get it to work in anaconda.
I believe it would be easier if I knew the name of the type of graph that is 'standard format' for displaying neural networks.
Please let me know if there is a package that I missed that is made for performing this task.
Here is how I get the network to display now:
code for graph:
import networkx as nx
G = nx.MultiDiGraph()
ed = N2.dna.get_conns(weight=True)
G.add_weighted_edges_from(ed)
nx.draw_planar(G,with_labels=True,font_weight='bold')
ed
Out[32]:
[[0, 3, -1],
[1, 3, -1],
[2, 3, -1],
[0, 4, -1],
[4, 5, -1],
[5, 3, 100],
[2, 4, 10]]
Wish i understand you right.
Possible solution:
import networkx as nx
from networkx.drawing.nx_agraph import graphviz_layout
G = nx.DiGraph()
ed = [[0, 4, -1],
[0, 5, -1],
[1, 4, -1],
[1, 5, -1],
[2, 4, -1],
[2, 5, 10],
[4, 3, -1],
[5, 3, 100]]
G.add_weighted_edges_from(ed)
pos = graphviz_layout(G, prog='dot', args="-Grankdir=LR")
nx.draw(G,with_labels=True,pos=pos, font_weight='bold')