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

Method testVariables

problems_test.py:124–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

122 self.assertEqual(f.get_shape().as_list(), [])
123
124 def testVariables(self):
125 num_dims = 3
126 problem_defs = [{"name": "simple", "options": {}} for _ in xrange(num_dims)]
127 ensemble = problems.ensemble(problem_defs)
128 ensemble()
129 variables = tf.trainable_variables()
130 self.assertEqual(len(variables), num_dims)
131 for v in variables:
132 self.assertEqual(v.get_shape().as_list(), [])
133
134 @parameterized.expand([(-1,), (0,), (1,), (10,)])
135 def testValues(self, value):

Callers

nothing calls this directly

Calls 1

ensembleFunction · 0.85

Tested by

no test coverage detected