(x, shape)
| 239 | state = cell.zero_state(batch_size, dtype) |
| 240 | |
| 241 | def _assert_has_shape(x, shape): |
| 242 | x_shape = array_ops.shape(x) |
| 243 | packed_shape = array_ops.stack(shape) |
| 244 | return control_flow_ops.Assert( |
| 245 | math_ops.reduce_all(math_ops.equal(x_shape, packed_shape)), [ |
| 246 | "Expected shape for Tensor %s is " % x.name, packed_shape, |
| 247 | " but saw shape: ", x_shape |
| 248 | ]) |
| 249 | |
| 250 | if not context.executing_eagerly() and sequence_length is not None: |
| 251 | # Perform some shape validation |
no test coverage detected