Skip to content

Commit

Permalink
TFE: Add compatibility doc strings to functional layers
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 173589146
  • Loading branch information
caisq authored and tensorflower-gardener committed Oct 26, 2017
1 parent 00adbdb commit 68b00b0
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tensorflow/python/layers/convolutional.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ def conv1d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.Conv1D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -593,6 +597,10 @@ def conv2d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.Conv2D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -802,6 +810,10 @@ def conv3d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.Conv3D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -1128,6 +1140,10 @@ def separable_conv2d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.SeparableConv2d` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -1430,6 +1446,10 @@ def conv2d_transpose(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.Conv2DTranspose` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -1748,6 +1768,10 @@ def conv3d_transpose(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.Conv3DTranspose` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down
8 changes: 8 additions & 0 deletions tensorflow/python/layers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ def dense(
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.Dense` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -343,6 +347,10 @@ def dropout(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.Dropout` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down
4 changes: 4 additions & 0 deletions tensorflow/python/layers/maxout.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def maxout(inputs, num_units, axis=-1, name=None):
Raises:
ValueError: if num_units is not multiple of number of features.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.MaxOut` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down
5 changes: 5 additions & 0 deletions tensorflow/python/layers/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,11 @@ def batch_normalization(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.BatchNormalization`
instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down
24 changes: 24 additions & 0 deletions tensorflow/python/layers/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def average_pooling1d(inputs, pool_size, strides,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.AveragePooling1D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -217,6 +221,10 @@ def max_pooling1d(inputs, pool_size, strides,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.MaxPooling1D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -362,6 +370,10 @@ def average_pooling2d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.AveragePooling2D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -434,6 +446,10 @@ def max_pooling2d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.MaxPooling2D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -592,6 +608,10 @@ def average_pooling3d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.AveragePooling3D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down Expand Up @@ -668,6 +688,10 @@ def max_pooling3d(inputs,
Raises:
ValueError: if eager execution is enabled.
@compatibility(eager)
Not compatible with eager execution. Use `tf.layers.MaxPooling3D` instead.
@end_compatibility
"""
if context.in_eager_mode():
raise ValueError(
Expand Down

0 comments on commit 68b00b0

Please sign in to comment.