MCPcopy Create free account
hub / github.com/tensorflow/tfjs / CustomModule

Class CustomModule

e2e/integration_tests/convert_predict.py:313–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311 save_dir: directory name of where the saved model will be stored.
312 """
313 class CustomModule(tf.Module):
314
315 def __init__(self):
316 super(CustomModule, self).__init__()
317
318 @tf.function(input_signature=[tf.TensorSpec([], tf.int32),
319 tf.TensorSpec([], tf.int32),
320 tf.TensorSpec([], tf.int32)])
321 def control_flow(self, x, y, z):
322 i = 0
323 while i < z:
324 i += 1
325 j = 0
326 while j < y:
327 j += 1
328 if z > 0:
329 x += 1
330 else:
331 x += 2
332 return x
333
334
335 module = CustomModule()

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…