Remove ">>> _ =" These are unnecessary.

The doctest system no longer checks outputs if the author doesn't supply one.

PiperOrigin-RevId: 305055550
Change-Id: I424110500a15a8c79bf0082318c0a7d9af7fe608
This commit is contained in:
Mark Daoust 2020-04-06 10:04:55 -07:00 committed by TensorFlower Gardener
parent 6db5faa3e2
commit 5068c9c94b
3 changed files with 8 additions and 8 deletions

View File

@ -620,14 +620,14 @@ class Tensor(tensor_like.TensorLike):
The shape inference functions propagate shapes to the extent possible: The shape inference functions propagate shapes to the extent possible:
>>> _ = my_matmul.get_concrete_function( >>> f = my_matmul.get_concrete_function(
... tf.TensorSpec([None,3]), ... tf.TensorSpec([None,3]),
... tf.TensorSpec([3,5])) ... tf.TensorSpec([3,5]))
Result shape: (None, 5) Result shape: (None, 5)
Tracing may fail if a shape missmatch can be detected: Tracing may fail if a shape missmatch can be detected:
>>> _ = my_matmul.get_concrete_function( >>> cf = my_matmul.get_concrete_function(
... tf.TensorSpec([None,3]), ... tf.TensorSpec([None,3]),
... tf.TensorSpec([4,5])) ... tf.TensorSpec([4,5]))
Traceback (most recent call last): Traceback (most recent call last):
@ -647,7 +647,7 @@ class Tensor(tensor_like.TensorLike):
... print("Result shape: ", a.shape) ... print("Result shape: ", a.shape)
... return a ... return a
>>> _ = my_fun.get_concrete_function( >>> cf = my_fun.get_concrete_function(
... tf.TensorSpec([None, None])) ... tf.TensorSpec([None, None]))
Result shape: (5, 5) Result shape: (5, 5)
@ -712,7 +712,7 @@ class Tensor(tensor_like.TensorLike):
Trace the function, see the [Concrete Functions Trace the function, see the [Concrete Functions
Guide](https://www.tensorflow.org/guide/concrete_function) for details. Guide](https://www.tensorflow.org/guide/concrete_function) for details.
>>> _ = load_image.get_concrete_function( >>> cf = load_image.get_concrete_function(
... tf.TensorSpec([], dtype=tf.string)) ... tf.TensorSpec([], dtype=tf.string))
Initial shape: (None, None, 3) Initial shape: (None, None, 3)
Final shape: (28, 28, 3) Final shape: (28, 28, 3)

View File

@ -3296,11 +3296,11 @@ _VALUE_SET_CODE_STRING = """
>>> v = tf.Variable(1.) >>> v = tf.Variable(1.)
>>> _ = v.assign(2.) >>> v.assign(2.)
>>> print(v.numpy()) >>> print(v.numpy())
2.0 2.0
>>> _ = v.assign_add(1.) >>> v.assign_add(1.)
>>> print(v.numpy()) >>> print(v.numpy())
3.0"""[3:] # Prune first newline and indent to match the docstring template. 3.0"""[3:] # Prune first newline and indent to match the docstring template.

View File

@ -416,7 +416,7 @@ class Model(network.Network, version_utils.ModelVersionSelector):
>>> x = np.random.random((2, 3)) >>> x = np.random.random((2, 3))
>>> y = np.random.randint(0, 2, (2, 2)) >>> y = np.random.randint(0, 2, (2, 2))
>>> _ = model.fit(x, y, verbose=0) >>> model.fit(x, y, verbose=0)
>>> [m.name for m in model.metrics] >>> [m.name for m in model.metrics]
['loss', 'mae'] ['loss', 'mae']
@ -429,7 +429,7 @@ class Model(network.Network, version_utils.ModelVersionSelector):
>>> model.add_metric( >>> model.add_metric(
... tf.reduce_sum(output_2), name='mean', aggregation='mean') ... tf.reduce_sum(output_2), name='mean', aggregation='mean')
>>> model.compile(optimizer="Adam", loss="mse", metrics=["mae", "acc"]) >>> model.compile(optimizer="Adam", loss="mse", metrics=["mae", "acc"])
>>> _ = model.fit(x, (y, y), verbose=0) >>> model.fit(x, (y, y), verbose=0)
>>> [m.name for m in model.metrics] >>> [m.name for m in model.metrics]
['loss', 'out_loss', 'out_1_loss', 'out_mae', 'out_acc', 'out_1_mae', ['loss', 'out_loss', 'out_1_loss', 'out_mae', 'out_acc', 'out_1_mae',
'out_1_acc', 'mean'] 'out_1_acc', 'mean']