Home
last modified time | relevance | path

Searched refs:evaluate (Results 1 – 25 of 1230) sorted by relevance

12345678910>>...50

/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/
Dsql_dataset_test.py56 self.evaluate(get_next()))
58 self.evaluate(get_next())
69 self.assertEqual((b"John", b"Doe", b"n\0nsense"), self.evaluate(get_next()))
71 self.evaluate(get_next()))
73 self.evaluate(get_next())
84 self.assertEqual((b"John", b"Doe", b"Hi!"), self.evaluate(get_next()))
85 self.assertEqual((b"Jane", b"Moe", b"Hi again!"), self.evaluate(get_next()))
87 self.evaluate(get_next())
94 self.evaluate(get_next()))
96 self.evaluate(get_next()))
[all …]
Dstats_dataset_ops_test.py73 np.array([i] * i, dtype=np.int64), self.evaluate(next_element()))
74 summary_str = self.evaluate(aggregator.get_summary())
79 self.evaluate(next_element())
80 summary_str = self.evaluate(aggregator.get_summary())
92 self.assertEqual(i, self.evaluate(next_element()))
94 self.evaluate(aggregator.get_summary()), "record_latency",
97 self.evaluate(next_element())
99 self.evaluate(aggregator.get_summary()), "record_latency", 100.0)
109 np.array([i] * i, dtype=np.int64), self.evaluate(next_element()))
110 summary_str = self.evaluate(aggregator.get_summary())
[all …]
Dcopy_to_device_test.py60 self.assertEqual(i, self.evaluate(next_element))
62 self.evaluate(next_element)
84 self.assertAllEqual([0, 1, 2, 3], self.evaluate(next_element))
86 self.evaluate(next_element)
109 self.assertEqual(i, self.evaluate(next_element))
111 self.evaluate(next_element)
134 self.assertEqual(i, self.evaluate(next_element))
136 self.evaluate(next_element)
159 self.assertEqual({"a": i}, self.evaluate(next_element))
161 self.evaluate(next_element)
[all …]
/external/tensorflow/tensorflow/python/keras/optimizer_v2/
Dgradient_descent_test.py51 self.evaluate(variables.global_variables_initializer())
53 self.evaluate(sgd_op)
56 self.evaluate(var0))
58 self.evaluate(var1))
67 self.evaluate(variables.global_variables_initializer())
70 self.evaluate(sgd_op)
75 self.evaluate(var0))
77 self.evaluate(var1))
80 self.evaluate(sgd_op)
86 self.evaluate(var0))
[all …]
Dlearning_rate_schedule_test.py48 self.evaluate(variables.global_variables_initializer())
53 self.assertAllClose(self.evaluate(decayed_lr(step)), expected, 1e-6)
59 self.evaluate(variables.global_variables_initializer())
66 self.evaluate(step.assign(1))
67 self.assertAllClose(self.evaluate(decayed_lr(step)), expected, 1e-6)
70 self.evaluate(step.assign(2))
71 self.assertAllClose(self.evaluate(decayed_lr(step)), expected, 1e-6)
75 self.evaluate(step.assign(100))
76 self.assertAllClose(self.evaluate(decayed_lr(step)), expected, 1e-6)
88 self.evaluate(variables.global_variables_initializer())
[all …]
Drmsprop_test.py123 self.evaluate(variables.global_variables_initializer())
152 self.assertAllClose([1.0, 2.0], self.evaluate(var0))
153 self.assertAllClose([3.0, 4.0], self.evaluate(var1))
157 self.evaluate(update)
168 self.assertAllCloseAccordingToType(mg0_np, self.evaluate(mg0))
169 self.assertAllCloseAccordingToType(mg1_np, self.evaluate(mg1))
171 self.assertAllCloseAccordingToType(mom0_np, self.evaluate(mom0))
172 self.assertAllCloseAccordingToType(mom1_np, self.evaluate(mom1))
173 self.assertAllCloseAccordingToType(rms0_np, self.evaluate(rms0))
174 self.assertAllCloseAccordingToType(rms1_np, self.evaluate(rms1))
[all …]
Doptimizer_v2_test.py69 self.evaluate(variables.global_variables_initializer())
71 self.assertAllClose([1.0, 2.0], self.evaluate(var0))
72 self.assertAllClose([3.0, 4.0], self.evaluate(var1))
75 self.evaluate(variables.global_variables_initializer())
76 self.evaluate(opt_op)
78 self.assertAllClose([-14., -13.], self.evaluate(var0))
79 self.assertAllClose([-6., -5.], self.evaluate(var1))
92 self.evaluate(variables.global_variables_initializer())
94 self.assertAllClose([1.0, 2.0], self.evaluate(var0))
95 self.assertAllClose([3.0, 4.0], self.evaluate(var1))
[all …]
/external/tensorflow/tensorflow/python/keras/
Dmetrics_test.py56 self.evaluate(variables.variables_initializer(m.variables))
59 self.assertEqual(self.evaluate(m.total), 0)
62 self.assertEqual(self.evaluate(m(100)), 100)
63 self.assertEqual(self.evaluate(m.total), 100)
67 self.evaluate(update_op)
68 self.assertAlmostEqual(self.evaluate(m.result()), 106)
69 self.assertEqual(self.evaluate(m.total), 106) # 100 + 1 + 5
73 self.assertEqual(self.evaluate(m.total), 0)
78 self.evaluate(variables.variables_initializer(m.variables))
82 self.assertEqual(self.evaluate(result_t), 50)
[all …]
Dmetrics_confusion_matrix_test.py54 self.evaluate(variables.variables_initializer(fp_obj.variables))
62 self.evaluate(update_op)
68 self.evaluate(variables.variables_initializer(fp_obj.variables))
75 self.assertAllClose(14., self.evaluate(result))
79 self.evaluate(variables.variables_initializer(fp_obj.variables))
87 self.evaluate(update_op)
93 self.evaluate(variables.variables_initializer(fp_obj.variables))
103 self.assertAllClose([125., 42., 12.], self.evaluate(result))
134 self.evaluate(variables.variables_initializer(fn_obj.variables))
142 self.evaluate(update_op)
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dvariables_test.py69 self.evaluate(var0)
72 self.evaluate(var1)
74 self.evaluate(variables.global_variables_initializer())
76 self.assertAllClose(0.0, self.evaluate(var0))
77 self.assertAllClose(1.1, self.evaluate(var1))
104 self.evaluate(variables.global_variables_initializer())
106 self.assertAllClose(self.evaluate(rnd), self.evaluate(dep))
108 self.evaluate(rnd) + self.evaluate(dep) + 2.0, self.evaluate(depdep))
125 self.evaluate(variables.global_variables_initializer())
126 self.assertAllClose(0.0, self.evaluate(var))
[all …]
Dlookup_ops_test.py62 self.evaluate(table.initializer)
75 self.assertAllEqual(3, self.evaluate(table.size()))
81 result = self.evaluate(output)
87 self.evaluate(exported_keys_tensor))
88 self.assertItemsEqual([0, 1, 2], self.evaluate(exported_values_tensor))
98 self.assertAllEqual(3, self.evaluate(table.size()))
104 result = self.evaluate(output)
116 self.assertAllEqual(3, self.evaluate(table.size()))
121 result = self.evaluate(output)
132 self.assertAllEqual(3, self.evaluate(table.size()))
[all …]
Dreader_ops_test.py145 k, v = self.evaluate([key, value])
158 self.assertAllEqual(0, self.evaluate(work_completed))
159 self.assertAllEqual(0, self.evaluate(produced))
160 self.assertAllEqual(0, self.evaluate(queued_length))
162 self.evaluate(queue.enqueue_many([["A", "B", "C"]]))
163 self.evaluate(queue.close())
164 self.assertAllEqual(3, self.evaluate(queued_length))
167 self.assertAllEqual(1, self.evaluate(produced))
172 self.assertAllEqual(3, self.evaluate(produced))
173 self.assertAllEqual(0, self.evaluate(queued_length))
[all …]
/external/tensorflow/tensorflow/python/training/
Dlearning_rate_decay_test.py36 self.evaluate(variables.global_variables_initializer())
40 self.assertAllClose(self.evaluate(decayed_lr), expected, 1e-6)
46 self.evaluate(variables.global_variables_initializer())
52 self.evaluate(step.assign(1))
53 self.assertAllClose(self.evaluate(decayed_lr), expected, 1e-6)
56 self.evaluate(step.assign(2))
57 self.assertAllClose(self.evaluate(decayed_lr), .1, 1e-6)
61 self.evaluate(step.assign(100))
62 self.assertAllClose(self.evaluate(decayed_lr), expected, 1e-6)
72 self.evaluate(variables.global_variables_initializer())
[all …]
Drmsprop_test.py120 self.evaluate(variables.global_variables_initializer())
143 self.assertAllClose([1.0, 2.0], self.evaluate(var0))
144 self.assertAllClose([3.0, 4.0], self.evaluate(var1))
148 self.evaluate(update)
159 self.assertAllCloseAccordingToType(mg0_np, self.evaluate(mg0))
160 self.assertAllCloseAccordingToType(mg1_np, self.evaluate(mg1))
161 self.assertAllCloseAccordingToType(rms0_np, self.evaluate(rms0))
162 self.assertAllCloseAccordingToType(rms1_np, self.evaluate(rms1))
163 self.assertAllCloseAccordingToType(mom0_np, self.evaluate(mom0))
164 self.assertAllCloseAccordingToType(mom1_np, self.evaluate(mom1))
[all …]
Dmomentum_test.py70 self.evaluate(variables.global_variables_initializer())
72 self.assertAllClose([1.0, 2.0], self.evaluate(var0))
73 self.assertAllClose([3.0, 4.0], self.evaluate(var1))
88 self.evaluate(mom_update)
91 self.evaluate(slot0))
93 self.evaluate(slot1))
97 self.evaluate(var0))
100 self.evaluate(var1))
105 self.evaluate(mom_update)
109 self.evaluate(slot0))
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/utils/lit/lit/
DBooleanExpression.py23 def evaluate(string, variables, triple=""): member in BooleanExpression
139 self.assertTrue(BooleanExpression.evaluate('true', variables))
140 self.assertTrue(BooleanExpression.evaluate('its-true', variables))
141 self.assertTrue(BooleanExpression.evaluate('false-lol-true', variables))
142 self.assertTrue(BooleanExpression.evaluate('under_score', variables))
143 self.assertTrue(BooleanExpression.evaluate('e=quals', variables))
144 self.assertTrue(BooleanExpression.evaluate('d1g1ts', variables))
146 self.assertFalse(BooleanExpression.evaluate('false', variables))
147 self.assertFalse(BooleanExpression.evaluate('True', variables))
148 self.assertFalse(BooleanExpression.evaluate('true-ish', variables))
[all …]
/external/tensorflow/tensorflow/python/data/kernel_tests/
Dcache_test.py69 elements.append(self.evaluate(get_next()))
71 self.evaluate(get_next())
78 cached_elements.append(self.evaluate(get_next()))
80 self.evaluate(get_next())
88 replayed_elements.append(self.evaluate(get_next()))
90 self.evaluate(get_next())
98 self.evaluate(get_next())
114 self.evaluate(get_next1()) # this should succeed
117 self.evaluate(get_next2())
119 self.evaluate(get_next1()) # this should continue to succeed
[all …]
Dmulti_device_iterator_test.py51 self.evaluate(multi_device_iterator.initializer)
61 self.evaluate(multi_device_iterator.initializer)
64 self.assertEqual(i, self.evaluate(elem_on_1))
65 self.assertEqual(i + 1, self.evaluate(elem_on_2))
68 self.evaluate(elem_on_1)
69 self.evaluate(elem_on_2)
80 self.evaluate(multi_device_iterator.initializer)
83 self.assertEqual(i, self.evaluate(elem_on_1))
84 self.assertEqual(i + 1, self.evaluate(elem_on_2))
87 self.evaluate(elem_on_1)
[all …]
/external/tensorflow/tensorflow/python/data/util/
Dconvert_test.py34 self.assertEqual(3, self.evaluate(resp))
38 self.assertEqual(0, self.evaluate(resp))
43 self.assertEqual(compat.as_bytes("default"), self.evaluate(resp))
48 self.assertEqual(compat.as_bytes("value"), self.evaluate(resp))
52 self.evaluate(
55 self.assertAllEqual([1], self.evaluate(
57 self.assertAllEqual([1], self.evaluate(
60 self.evaluate(
67 self.evaluate(
71 self.evaluate(convert.partial_shape_to_tensor((None,))))
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/boosted_trees/
Dstats_ops_test.py68 self.assertAllEqual([[1, 2], [1, 2]], self.evaluate(node_ids_list))
70 self.evaluate(gains_list))
71 self.assertAllEqual([[1, 1], [1, 1]], self.evaluate(thresholds_list))
75 self.evaluate(left_node_contribs_list))
77 self.evaluate(right_node_contribs_list))
116 self.assertAllEqual([[1, 2], [1, 2]], self.evaluate(node_ids_list))
118 self.evaluate(gains_list))
119 self.assertAllEqual([[0, 1], [1, 1]], self.evaluate(thresholds_list))
123 self.evaluate(left_node_contribs_list))
125 self.evaluate(right_node_contribs_list))
[all …]
Dresource_ops_test.py39 self.assertEqual(0, self.evaluate(stamp_token))
42 self.assertEqual(0, self.evaluate(num_trees))
43 self.assertEqual(0, self.evaluate(num_finalized_trees))
44 self.assertEqual(0, self.evaluate(num_attempted_layers))
45 self.assertAllEqual([0, 1], self.evaluate(nodes_range))
159 self.assertEqual(7, self.evaluate(stamp_token))
160 self.assertEqual(2, self.evaluate(num_trees))
161 self.assertEqual(1, self.evaluate(num_finalized_trees))
162 self.assertEqual(6, self.evaluate(num_attempted_layers))
163 self.assertAllEqual([16, 19], self.evaluate(nodes_range))
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/distributions/
Dnormal_test.py59 is_finite = np.isfinite(self.evaluate(tensor))
66 self.assertAllEqual(expected, self.evaluate(mu_shape))
67 self.assertAllEqual(expected, self.evaluate(sigma_shape))
72 self.evaluate(array_ops.shape(normal_lib.Normal(mu, sigma).sample())))
106 self.assertAllEqual(self.evaluate(mu), self.evaluate(normal.loc))
108 self.evaluate(nn_ops.softplus(rho)), self.evaluate(normal.scale))
120 self.evaluate(normal.batch_shape_tensor()), log_pdf.get_shape())
122 self.evaluate(normal.batch_shape_tensor()),
123 self.evaluate(log_pdf).shape)
125 self.assertAllEqual(normal.batch_shape, self.evaluate(log_pdf).shape)
[all …]
/external/tensorflow/tensorflow/compiler/tests/
Dftrl_test.py53 self.assertAllClose([0.0, 0.0], self.evaluate(var0))
54 self.assertAllClose([0.0, 0.0], self.evaluate(var1))
60 return self.evaluate(var0), self.evaluate(var1)
68 self.assertAllClose([0.0, 0.0], self.evaluate(var0))
69 self.assertAllClose([0.0, 0.0], self.evaluate(var1))
75 return self.evaluate(var0), self.evaluate(var1)
88 self.assertAllClose([0.0, 0.0], self.evaluate(var0))
89 self.assertAllClose([0.0, 0.0], self.evaluate(var1))
95 return self.evaluate(var0), self.evaluate(var1)
103 self.assertAllClose([0.0, 0.0], self.evaluate(var0))
[all …]
/external/tensorflow/tensorflow/python/training/tracking/
Dutil_test.py120 self.evaluate(trackable_utils.gather_initializers(obj))
122 self.assertEqual(1, self.evaluate(constant_initializer))
125 self.assertAllEqual([1, 1], self.evaluate(ones_initializer))
127 [0., 0.]], self.evaluate(bare_initializer))
172 self.assertAllEqual([1., 1., 1.], self.evaluate(v2))
284 self.evaluate(trackable_utils.gather_initializers(
286 self.evaluate(train_op)
367 self.evaluate(v.non_dep_variable.assign(42.))
369 self.evaluate(v.non_dep_variable.assign(43.))
370 self.evaluate(v.mirrored.assign(44.))
[all …]
/external/mockito/src/test/java/org/mockitoutil/
DSafeJUnitRuleTest.java24 public void evaluate() throws Throwable { in happy_path_no_exception()
27 }, mock(FrameworkMethod.class), this).evaluate(); in happy_path_no_exception()
37 public void evaluate() throws Throwable { in regular_failing_test()
40 }, mock(FrameworkMethod.class), this).evaluate(); in regular_failing_test()
49 public void evaluate() throws Throwable { in rule_threw_exception()
52 }, mock(FrameworkMethod.class), this).evaluate(); in rule_threw_exception()
62 public void evaluate() throws Throwable { in expected_exception_but_no_exception()
65 }, mock(FrameworkMethod.class), this).evaluate(); in expected_exception_but_no_exception()
81 public void evaluate() throws Throwable { in expected_exception_message_did_not_match()
84 }, mock(FrameworkMethod.class), this).evaluate(); in expected_exception_message_did_not_match()
[all …]

12345678910>>...50