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

Function deprecated_argument_lookup

tensorflow/python/util/deprecation.py:583–601  ·  view source on GitHub ↗

Looks up deprecated argument name and ensures both are not used. Args: new_name: new name of argument new_value: value of new argument (or None if not used) old_name: old name of argument old_value: value of old argument (or None if not used) Returns: The effective argument

(new_name, new_value, old_name, old_value)

Source from the content-addressed store, hash-verified

581
582
583def deprecated_argument_lookup(new_name, new_value, old_name, old_value):
584 """Looks up deprecated argument name and ensures both are not used.
585
586 Args:
587 new_name: new name of argument
588 new_value: value of new argument (or None if not used)
589 old_name: old name of argument
590 old_value: value of old argument (or None if not used)
591 Returns:
592 The effective argument that should be used.
593 Raises:
594 ValueError: if new_value and old_value are both non-null
595 """
596 if old_value is not None:
597 if new_value is not None:
598 raise ValueError("Cannot specify both '%s' and '%s'" %
599 (old_name, new_name))
600 return old_value
601 return new_value
602
603
604def rewrite_argument_docstring(old_doc, old_argument, new_argument):

Callers 15

cosine_distanceFunction · 0.90
l2_normalizeFunction · 0.90
depthwise_conv2dFunction · 0.90
separable_conv2dFunction · 0.90
sufficient_statisticsFunction · 0.90
momentsFunction · 0.90
weighted_momentsFunction · 0.90
dilation2d_v1Function · 0.90
convolutionFunction · 0.90
poolFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected