import tensorflow as tf

                cell_drop = tf.contrib.rnn.DropoutWrapper(cell_basic, variational_recurrent=True, dtype=tf.float32,
                                                          input_size=num_input, input_keep_prob=input_prob,
                                                          state_keep_prob=state_prob)
            else: #tanh by default
                cell_basic = tf.contrib.rnn.BasicRNNCell(state_size)
                cell_drop = tf.contrib.rnn.DropoutWrapper(cell_basic, variational_recurrent=True, dtype=tf.float32,
                                                          input_size=num_input, input_keep_prob=input_prob,
                                                          state_keep_prob=state_prob)

        return cell_drop
