(x, shape)
| 680 | state = cell.zero_state(batch_size, dtype) |
| 681 | |
| 682 | def _assert_has_shape(x, shape): |
| 683 | x_shape = array_ops.shape(x) |
| 684 | packed_shape = array_ops.stack(shape) |
| 685 | return control_flow_ops.Assert( |
| 686 | math_ops.reduce_all(math_ops.equal(x_shape, packed_shape)), [ |
| 687 | "Expected shape for Tensor %s is " % x.name, packed_shape, |
| 688 | " but saw shape: ", x_shape |
| 689 | ]) |
| 690 | |
| 691 | if not context.executing_eagerly() and sequence_length is not None: |
| 692 | # Perform some shape validation |
no test coverage detected