@tf_export('lstm_block_cell')
def lstm_block_cell(x, cs_prev, h_prev, w, wci, wcf, wco, b, forget_bias=1, cell_clip=3, use_peephole=False, name=None):
    "Computes the LSTM cell forward propagation for 1 time step.\n\n  This implementation uses 1 weight matrix and 1 bias vector, and there's an\n  optional peephole connection.\n\n  This kernel op implements the following mathematical equations:\n\n  ```python\n  xh = [x, h_prev]\n  [i, f, ci, o] = xh * w + b\n  f = f + forget_bias\n\n  if not use_peephole:\n    wci = wcf = wco = 0\n\n  i = sigmoid(cs_prev * wci + i)\n  f = sigmoid(cs_prev * wcf + f)\n  ci = tanh(ci)\n\n  cs = ci .* i + cs_prev .* f\n  cs = clip(cs, cell_clip)\n\n  o = sigmoid(cs * wco + o)\n  co = tanh(cs)\n  h = co .* o\n  ```\n\n  Args:\n    x: A `Tensor`. Must be one of the following types: `half`, `float32`.\n      The input to the LSTM cell, shape (batch_size, num_inputs).\n    cs_prev: A `Tensor`. Must have the same type as `x`.\n      Value of the cell state at previous time step.\n    h_prev: A `Tensor`. Must have the same type as `x`.\n      Output of the previous cell at previous time step.\n    w: A `Tensor`. Must have the same type as `x`. The weight matrix.\n    wci: A `Tensor`. Must have the same type as `x`.\n      The weight matrix for input gate peephole connection.\n    wcf: A `Tensor`. Must have the same type as `x`.\n      The weight matrix for forget gate peephole connection.\n    wco: A `Tensor`. Must have the same type as `x`.\n      The weight matrix for output gate peephole connection.\n    b: A `Tensor`. Must have the same type as `x`. The bias vector.\n    forget_bias: An optional `float`. Defaults to `1`. The forget gate bias.\n    cell_clip: An optional `float`. Defaults to `3`.\n      Value to clip the 'cs' value to.\n    use_peephole: An optional `bool`. Defaults to `False`.\n      Whether to use peephole weights.\n    name: A name for the operation (optional).\n\n  Returns:\n    A tuple of `Tensor` objects (i, cs, f, o, ci, co, h).\n\n    i: A `Tensor`. Has the same type as `x`. The input gate.\n    cs: A `Tensor`. Has the same type as `x`. The cell state before the tanh.\n    f: A `Tensor`. Has the same type as `x`. The forget gate.\n    o: A `Tensor`. Has the same type as `x`. The output gate.\n    ci: A `Tensor`. Has the same type as `x`. The cell input.\n    co: A `Tensor`. Has the same type as `x`. The cell after the tanh.\n    h: A `Tensor`. Has the same type as `x`. The output h vector.\n  "
    _ctx = _context._context
    if ((_ctx is None) or (not _ctx._eager_context.is_eager)):
        if (forget_bias is None):
            forget_bias = 1
        forget_bias = _execute.make_float(forget_bias, 'forget_bias')
        if (cell_clip is None):
            cell_clip = 3
        cell_clip = _execute.make_float(cell_clip, 'cell_clip')
        if (use_peephole is None):
            use_peephole = False
        use_peephole = _execute.make_bool(use_peephole, 'use_peephole')
        (_, _, _op) = _op_def_lib._apply_op_helper('LSTMBlockCell', x=x, cs_prev=cs_prev, h_prev=h_prev, w=w, wci=wci, wcf=wcf, wco=wco, b=b, forget_bias=forget_bias, cell_clip=cell_clip, use_peephole=use_peephole, name=name)
        _result = _op.outputs[:]
        _inputs_flat = _op.inputs
        _attrs = ('forget_bias', _op.get_attr('forget_bias'), 'cell_clip', _op.get_attr('cell_clip'), 'use_peephole', _op.get_attr('use_peephole'), 'T', _op.get_attr('T'))
        _execute.record_gradient('LSTMBlockCell', _inputs_flat, _attrs, _result, name)
        _result = _LSTMBlockCellOutput._make(_result)
        return _result
    else:
        try:
            _result = _pywrap_tensorflow.TFE_Py_FastPathExecute(_ctx._context_handle, _ctx._eager_context.device_name, 'LSTMBlockCell', name, _ctx._post_execution_callbacks, x, cs_prev, h_prev, w, wci, wcf, wco, b, 'forget_bias', forget_bias, 'cell_clip', cell_clip, 'use_peephole', use_peephole)
            _result = _LSTMBlockCellOutput._make(_result)
            return _result
        except _core._FallbackException:
            return lstm_block_cell_eager_fallback(x, cs_prev, h_prev, w, wci, wcf, wco, b, forget_bias=forget_bias, cell_clip=cell_clip, use_peephole=use_peephole, name=name, ctx=_ctx)
        except _core._NotOkStatusException as e:
            if (name is not None):
                message = ((e.message + ' name: ') + name)
            else:
                message = e.message
            _six.raise_from(_core._status_to_exception(e.code, message), None)
Computes the LSTM cell forward propagation for 1 time step.

This implementation uses 1 weight matrix and 1 bias vector, and there's an
optional peephole connection.

This kernel op implements the following mathematical equations:

```python
xh = [x, h_prev]
[i, f, ci, o] = xh * w + b
f = f + forget_bias

if not use_peephole:
  wci = wcf = wco = 0

i = sigmoid(cs_prev * wci + i)
f = sigmoid(cs_prev * wcf + f)
ci = tanh(ci)

cs = ci .* i + cs_prev .* f
cs = clip(cs, cell_clip)

o = sigmoid(cs * wco + o)
co = tanh(cs)
h = co .* o
```

Args:
  x: A `Tensor`. Must be one of the following types: `half`, `float32`.
    The input to the LSTM cell, shape (batch_size, num_inputs).
  cs_prev: A `Tensor`. Must have the same type as `x`.
    Value of the cell state at previous time step.
  h_prev: A `Tensor`. Must have the same type as `x`.
    Output of the previous cell at previous time step.
  w: A `Tensor`. Must have the same type as `x`. The weight matrix.
  wci: A `Tensor`. Must have the same type as `x`.
    The weight matrix for input gate peephole connection.
  wcf: A `Tensor`. Must have the same type as `x`.
    The weight matrix for forget gate peephole connection.
  wco: A `Tensor`. Must have the same type as `x`.
    The weight matrix for output gate peephole connection.
  b: A `Tensor`. Must have the same type as `x`. The bias vector.
  forget_bias: An optional `float`. Defaults to `1`. The forget gate bias.
  cell_clip: An optional `float`. Defaults to `3`.
    Value to clip the 'cs' value to.
  use_peephole: An optional `bool`. Defaults to `False`.
    Whether to use peephole weights.
  name: A name for the operation (optional).

Returns:
  A tuple of `Tensor` objects (i, cs, f, o, ci, co, h).

  i: A `Tensor`. Has the same type as `x`. The input gate.
  cs: A `Tensor`. Has the same type as `x`. The cell state before the tanh.
  f: A `Tensor`. Has the same type as `x`. The forget gate.
  o: A `Tensor`. Has the same type as `x`. The output gate.
  ci: A `Tensor`. Has the same type as `x`. The cell input.
  co: A `Tensor`. Has the same type as `x`. The cell after the tanh.
  h: A `Tensor`. Has the same type as `x`. The output h vector.
@tf_export('lstm_block_cell')
def lstm_block_cell(x, cs_prev, h_prev, w, wci, wcf, wco, b, forget_bias=1, cell_clip=3, use_peephole=False, name=None):
    "Computes the LSTM cell forward propagation for 1 time step.\n\n  This implementation uses 1 weight matrix and 1 bias vector, and there's an\n  optional peephole connection.\n\n  This kernel op implements the following mathematical equations:\n\n  ```python\n  xh = [x, h_prev]\n  [i, f, ci, o] = xh * w + b\n  f = f + forget_bias\n\n  if not use_peephole:\n    wci = wcf = wco = 0\n\n  i = sigmoid(cs_prev * wci + i)\n  f = sigmoid(cs_prev * wcf + f)\n  ci = tanh(ci)\n\n  cs = ci .* i + cs_prev .* f\n  cs = clip(cs, cell_clip)\n\n  o = sigmoid(cs * wco + o)\n  co = tanh(cs)\n  h = co .* o\n  ```\n\n  Args:\n    x: A `Tensor`. Must be one of the following types: `half`, `float32`.\n      The input to the LSTM cell, shape (batch_size, num_inputs).\n    cs_prev: A `Tensor`. Must have the same type as `x`.\n      Value of the cell state at previous time step.\n    h_prev: A `Tensor`. Must have the same type as `x`.\n      Output of the previous cell at previous time step.\n    w: A `Tensor`. Must have the same type as `x`. The weight matrix.\n    wci: A `Tensor`. Must have the same type as `x`.\n      The weight matrix for input gate peephole connection.\n    wcf: A `Tensor`. Must have the same type as `x`.\n      The weight matrix for forget gate peephole connection.\n    wco: A `Tensor`. Must have the same type as `x`.\n      The weight matrix for output gate peephole connection.\n    b: A `Tensor`. Must have the same type as `x`. The bias vector.\n    forget_bias: An optional `float`. Defaults to `1`. The forget gate bias.\n    cell_clip: An optional `float`. Defaults to `3`.\n      Value to clip the 'cs' value to.\n    use_peephole: An optional `bool`. Defaults to `False`.\n      Whether to use peephole weights.\n    name: A name for the operation (optional).\n\n  Returns:\n    A tuple of `Tensor` objects (i, cs, f, o, ci, co, h).\n\n    i: A `Tensor`. Has the same type as `x`. The input gate.\n    cs: A `Tensor`. Has the same type as `x`. The cell state before the tanh.\n    f: A `Tensor`. Has the same type as `x`. The forget gate.\n    o: A `Tensor`. Has the same type as `x`. The output gate.\n    ci: A `Tensor`. Has the same type as `x`. The cell input.\n    co: A `Tensor`. Has the same type as `x`. The cell after the tanh.\n    h: A `Tensor`. Has the same type as `x`. The output h vector.\n  "
    _ctx = _context._context
    if ((_ctx is None) or (not _ctx._eager_context.is_eager)):
        if (forget_bias is None):
            forget_bias = 1
        forget_bias = _execute.make_float(forget_bias, 'forget_bias')
        if (cell_clip is None):
            cell_clip = 3
        cell_clip = _execute.make_float(cell_clip, 'cell_clip')
        if (use_peephole is None):
            use_peephole = False
        use_peephole = _execute.make_bool(use_peephole, 'use_peephole')
        (_, _, _op) = _op_def_lib._apply_op_helper('LSTMBlockCell', x=x, cs_prev=cs_prev, h_prev=h_prev, w=w, wci=wci, wcf=wcf, wco=wco, b=b, forget_bias=forget_bias, cell_clip=cell_clip, use_peephole=use_peephole, name=name)
        _result = _op.outputs[:]
        _inputs_flat = _op.inputs
        _attrs = ('forget_bias', _op.get_attr('forget_bias'), 'cell_clip', _op.get_attr('cell_clip'), 'use_peephole', _op.get_attr('use_peephole'), 'T', _op.get_attr('T'))
        _execute.record_gradient('LSTMBlockCell', _inputs_flat, _attrs, _result, name)
        _result = _LSTMBlockCellOutput._make(_result)
        return _result
    else:
        try:
            _result = _pywrap_tensorflow.TFE_Py_FastPathExecute(_ctx._context_handle, _ctx._eager_context.device_name, 'LSTMBlockCell', name, _ctx._post_execution_callbacks, x, cs_prev, h_prev, w, wci, wcf, wco, b, 'forget_bias', forget_bias, 'cell_clip', cell_clip, 'use_peephole', use_peephole)
            _result = _LSTMBlockCellOutput._make(_result)
            return _result
        except _core._FallbackException:
            return lstm_block_cell_eager_fallback(x, cs_prev, h_prev, w, wci, wcf, wco, b, forget_bias=forget_bias, cell_clip=cell_clip, use_peephole=use_peephole, name=name, ctx=_ctx)
        except _core._NotOkStatusException as e:
            if (name is not None):
                message = ((e.message + ' name: ') + name)
            else:
                message = e.message
            _six.raise_from(_core._status_to_exception(e.code, message), None)