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

Method test_nested_outputs

tensorflow/python/saved_model/save_test.py:208–216  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

206 root.f([constant_op.constant(1.), constant_op.constant(1.)])
207
208 def test_nested_outputs(self):
209 root = tracking.AutoTrackable()
210 root.f = def_function.function(lambda x: (2. * x, (3. * x, 4. * x)))
211 root.f(constant_op.constant(1.))
212 to_save = root.f.get_concrete_function(constant_op.constant(1.))
213 save_dir = os.path.join(self.get_temp_dir(), "saved_model")
214 with self.assertRaisesRegexp(
215 ValueError, "non-flat outputs"):
216 save.save(root, save_dir, to_save)
217
218 def test_nested_dict_outputs(self):
219 root = util.Checkpoint(

Callers

nothing calls this directly

Calls 7

get_temp_dirMethod · 0.80
functionMethod · 0.45
fMethod · 0.45
constantMethod · 0.45
get_concrete_functionMethod · 0.45
joinMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected