MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testRange

Method testRange

tensorflow/python/grappler/datasets_test.py:122–134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

120 op_properties['IteratorGetNext'][0].shape)
121
122 def testRange(self):
123 with ops.Graph().as_default() as g:
124 dataset = dataset_ops.Dataset.range(42)
125 iterator = dataset_ops.make_one_shot_iterator(dataset)
126 get_next = iterator.get_next()
127 train_op = ops.get_collection_ref(ops.GraphKeys.TRAIN_OP)
128 train_op.append(get_next)
129 mg = meta_graph.create_meta_graph_def(graph=g)
130 grappler_item = item.Item(mg)
131 op_properties = grappler_item.GetOpProperties()
132 self.assertEqual(
133 tensor_shape.TensorShape([]),
134 op_properties['IteratorGetNext'][0].shape)
135
136 def _testTransformation(self, fn):
137 test_cases = [{

Callers

nothing calls this directly

Calls 9

GetOpPropertiesMethod · 0.95
get_collection_refMethod · 0.80
ItemMethod · 0.80
as_defaultMethod · 0.45
GraphMethod · 0.45
rangeMethod · 0.45
get_nextMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected