
    AVh                         d Z ddlmZ ddlmZ d Z  ej                  d      e         ej                  d      e       y)z)Gradients for (block) GRU/LSTM operators.    )ops)gen_rnn_opsc           	      H   | j                   \	  }}}}}}}}	}
| j                  \  }}}}}}}|\  }}}}}}}t        j                  di d|d|d|d|d|d|d|d|	d	|
d
|d|d|d|d|d|d|d|d|d| j	                  d      \  }}}}}}}}d||||||||f	S )zGradient for the BlockLSTM op.seq_len_maxxcs_prevh_prevwwciwcfwcobicsfocicohcs_gradh_graduse_peepholeN )inputsoutputsr   block_lstm_gradget_attr)opgradsr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   _r   r   x_gradcs_prev_gradh_prev_gradw_gradwci_gradwcf_gradwco_gradb_grads                                N/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/rnn_grad.py_block_lstm_gradr*      sQ   9;6+q'61c3Q::!RAr2q#( !WaAq&(( 11	
1 1 	1
 
1 1 1 1 
1 
1 1 
1 
1 1 1  
!1" #1$ %1& KK/'16<fh(	( k68X
F
     	BlockLSTMBlockLSTMV2N)__doc__tensorflow.python.frameworkr   tensorflow.python.opsr   r*   RegisterGradientr   r+   r)   <module>r2      sI    0 + -< "   [ !"2 3 #   ] #$4 5r+   