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

Method _internal_operation_seed

tensorflow/python/eager/context.py:438–448  ·  view source on GitHub ↗

Returns a fake operation seed. In eager mode, user shouldn't set or depend on operation seed. Here, we generate a random seed based on global seed to make operation's randomness different and depend on the global seed. Returns: A fake operation seed based on global seed

(self)

Source from the content-addressed store, hash-verified

436 pywrap_tensorflow.TFE_ContextClearCaches(self._context_handle)
437
438 def _internal_operation_seed(self):
439 """Returns a fake operation seed.
440
441 In eager mode, user shouldn't set or depend on operation seed.
442 Here, we generate a random seed based on global seed to make
443 operation's randomness different and depend on the global seed.
444
445 Returns:
446 A fake operation seed based on global seed.
447 """
448 return self._rng.randint(0, _MAXINT32)
449
450 def _initialize_logical_devices(self):
451 """Helper to initialize devices."""

Callers 1

internal_operation_seedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected