diff --git a/python/paddle/fluid/variable_index.py b/python/paddle/fluid/variable_index.py index 19067b8ae12528080972b6a7f8b5c1b876c84cbb..5aa7f9c972f9b6eac66587696a98c0f460782a73 100644 --- a/python/paddle/fluid/variable_index.py +++ b/python/paddle/fluid/variable_index.py @@ -674,14 +674,6 @@ def _setitem_impl_(var, item, value): # the item is a tensor of bool def set_value_for_bool_tensor(var, item, value): - - # TODO(zyfncg): Now scatter_nd_add only support float32 and float64 tensor, - # so in the current version we also only support float32 and float64 tensor, - # this problem will be fixed in the future. - if var.dtype != core.VarDesc.VarType.FP32 and var.dtype != core.VarDesc.VarType.FP64: - raise TypeError("Only support float and double tensor for bool index, " - "but received {}.".format(var.dtype)) - if len(item.shape) > len(var.shape): raise IndexError("The dims of bool index doesn't match indexed array, " "the dims of bool index except to be equal or less "