本文整理匯總了Python中dragnn.python.render_spec_with_graphviz.master_spec_graph方法的典型用法代碼示例。如果您正苦於以下問題:Python render_spec_with_graphviz.master_spec_graph方法的具體用法?Python render_spec_with_graphviz.master_spec_graph怎麽用?Python render_spec_with_graphviz.master_spec_graph使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dragnn.python.render_spec_with_graphviz
的用法示例。
在下文中一共展示了render_spec_with_graphviz.master_spec_graph方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_constructs_simple_graph
# 需要導入模塊: from dragnn.python import render_spec_with_graphviz [as 別名]
# 或者: from dragnn.python.render_spec_with_graphviz import master_spec_graph [as 別名]
def test_constructs_simple_graph(self):
master_spec = _make_basic_master_spec()
contents = render_spec_with_graphviz.master_spec_graph(master_spec)
self.assertIn('lookahead', contents)
self.assertIn('<polygon', contents)
self.assertIn('roboto, helvetica, arial', contents)
self.assertIn('FeedForwardNetwork', contents)
# Graphviz currently over-escapes hyphens.
self.assertTrue(('arc-standard' in contents) or
('arc-standard' in contents))
self.assertIn('input.focus', contents)
self.assertTrue('input.word' not in contents,
"We don't yet show fixed features")