Proper check for eagerness in concat_grad
PiperOrigin-RevId: 241945534
This commit is contained in:
parent
fd32a7f773
commit
fa5ad62d32
@ -107,7 +107,7 @@ def _ConcatGradHelper(op, grad, start_value_index, end_value_index, dim_index):
|
|||||||
|
|
||||||
out_grads = []
|
out_grads = []
|
||||||
if isinstance(grad, ops.Tensor):
|
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
|
# Using mod here for convenience since concat_dim is already verified
|
||||||
# in concat implementation to be within the allowed [-rank, rank) range.
|
# in concat implementation to be within the allowed [-rank, rank) range.
|
||||||
non_neg_concat_dim = (
|
non_neg_concat_dim = (
|
||||||
|
Loading…
Reference in New Issue
Block a user