MCPcopy Index your code
hub / github.com/google-deepmind/learning-to-learn / testValues

Method testValues

problems_test.py:135–144  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

133
134 @parameterized.expand([(-1,), (0,), (1,), (10,)])
135 def testValues(self, value):
136 num_dims = 1
137 weight = 0.5
138 problem_defs = [{"name": "simple", "options": {}} for _ in xrange(num_dims)]
139 ensemble = problems.ensemble(problem_defs, weights=[weight])
140 f = ensemble()
141
142 with self.test_session() as sess:
143 output = sess.run(f, feed_dict={"problem_0/x:0": value})
144 self.assertEqual(output, weight * value**2)
145
146
147if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

ensembleFunction · 0.85

Tested by

no test coverage detected