Fix default value of IndexedSlicesSpec dense_shape_dtype to be

a legal possibility. `True` was being interpreted as a "float"
dtype, but only int32, int64, or None are allowed here.

PiperOrigin-RevId: 255039603
This commit is contained in:
A. Unique TensorFlower 2019-06-25 13:48:44 -07:00 committed by TensorFlower Gardener
parent 6a88595b5d
commit 296a4808cc
3 changed files with 3 additions and 3 deletions

View File

@ -188,7 +188,7 @@ class IndexedSlicesSpec(type_spec.TypeSpec):
value_type = property(lambda self: IndexedSlices)
def __init__(self, shape=None, dtype=dtypes.float32,
indices_dtype=dtypes.int64, dense_shape_dtype=True,
indices_dtype=dtypes.int64, dense_shape_dtype=None,
indices_shape=None):
"""Constructs a type specification for a `tf.IndexedSlices`.

View File

@ -9,7 +9,7 @@ tf_class {
}
member_method {
name: "__init__"
argspec: "args=[\'self\', \'shape\', \'dtype\', \'indices_dtype\', \'dense_shape_dtype\', \'indices_shape\'], varargs=None, keywords=None, defaults=[\'None\', \"<dtype: \'float32\'>\", \"<dtype: \'int64\'>\", \'True\', \'None\'], "
argspec: "args=[\'self\', \'shape\', \'dtype\', \'indices_dtype\', \'dense_shape_dtype\', \'indices_shape\'], varargs=None, keywords=None, defaults=[\'None\', \"<dtype: \'float32\'>\", \"<dtype: \'int64\'>\", \'None\', \'None\'], "
}
member_method {
name: "is_compatible_with"

View File

@ -9,7 +9,7 @@ tf_class {
}
member_method {
name: "__init__"
argspec: "args=[\'self\', \'shape\', \'dtype\', \'indices_dtype\', \'dense_shape_dtype\', \'indices_shape\'], varargs=None, keywords=None, defaults=[\'None\', \"<dtype: \'float32\'>\", \"<dtype: \'int64\'>\", \'True\', \'None\'], "
argspec: "args=[\'self\', \'shape\', \'dtype\', \'indices_dtype\', \'dense_shape_dtype\', \'indices_shape\'], varargs=None, keywords=None, defaults=[\'None\', \"<dtype: \'float32\'>\", \"<dtype: \'int64\'>\", \'None\', \'None\'], "
}
member_method {
name: "is_compatible_with"