本文整理汇总了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")