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

Method _compare

tensorflow/compiler/tests/scan_ops_test.py:157–164  ·  view source on GitHub ↗
(self, x, axis, exclusive, reverse)

Source from the content-addressed store, hash-verified

155 return set(self.int_types).intersection([np.int32, np.int64])
156
157 def _compare(self, x, axis, exclusive, reverse):
158 np_out = handle_options(np.cumprod, x, axis, exclusive, reverse)
159 with self.session(), self.test_scope():
160 p = array_ops.placeholder(x.dtype)
161 prod = math_ops.cumprod(p, axis, exclusive, reverse)
162 tf_out = prod.eval(feed_dict={p: x})
163
164 self.assertAllClose(np_out, tf_out)
165
166 def _compareAll(self, x, axis):
167 for exclusive in [True, False]:

Callers 1

_compareAllMethod · 0.95

Calls 6

handle_optionsFunction · 0.70
sessionMethod · 0.45
test_scopeMethod · 0.45
placeholderMethod · 0.45
evalMethod · 0.45
assertAllCloseMethod · 0.45

Tested by

no test coverage detected