Proper check for eagerness in concat_grad

PiperOrigin-RevId: 241945534
This commit is contained in:
Alexandre Passos 2019-04-04 09:35:14 -07:00 committed by TensorFlower Gardener
parent fd32a7f773
commit fa5ad62d32

View File

@ -107,7 +107,7 @@ def _ConcatGradHelper(op, grad, start_value_index, end_value_index, dim_index):
out_grads = []
if isinstance(grad, ops.Tensor):
if context.executing_eagerly():
if context.executing_eagerly() or isinstance(concat_dim, ops.EagerTensor):
# Using mod here for convenience since concat_dim is already verified
# in concat implementation to be within the allowed [-rank, rank) range.
non_neg_concat_dim = (