【发布时间】:2018-06-23 22:35:05
【问题描述】:
我正在尝试使用 TensorFlow 构建一个可以识别 CAD 模型中的特征的人工神经网络。
使用 CAD 模型数据,我计算了某些面之间的邻接关系,并将其绘制在一个图上,其中每个节点都是一个面,面之间的每条边表示邻接,权重 0 和 1 分别表示凸凹关系。下面是绘制邻接图的代码:
import networkx as nx
import matplotlib.pyplot as plt
%matplotlib inline
G=nx.Graph()
#adding nodes
G.add_nodes_from(range(1, 10))
#adding edges
G.add_weighted_edges_from([(1, 2, 0), (1, 3, 0), (1, 6, 1), (1, 8, 1),
(2, 5, 1), (2, 6, 1), (2, 8, 1), (3, 4, 1),(3, 6, 1), (3, 8, 1),
(4, 6, 1), (4, 7, 1), (4, 8, 1), (5, 6, 1), (5, 8, 1), (5, 9, 1),
(6, 7, 1), (6, 9, 1), (6, 10, 1), (7, 8, 1), (7, 10, 1), (8, 9, 1),
(8, 10, 1), (9, 10, 1)])
#draw AAG
nx.draw_circular(G, node_color = 'bisque', with_labels=True)
我的问题是:是否有可能将邻接图输入 TensorFlow 中的神经网络,教它哪些面孔构成了模型中存在的“特征”?
任何关于该主题的帮助将不胜感激
【问题讨论】:
标签: python tensorflow machine-learning networkx graph-theory