import tensorflow as tf

            tf.add_to_collection(self._initial_state_name, state_tuple.c)
            tf.add_to_collection(self._initial_state_name, state_tuple.h)
        for state_tuple in self._final_state:
            tf.add_to_collection(self._final_state_name, state_tuple.c)
            tf.add_to_collection(self._final_state_name, state_tuple.h)


    def import_state_tuples(self, state_tuples, name, num_replicas):
        restored = []
        for i in range(len(state_tuples) * num_replicas):
            c = tf.get_collection_ref(name)[2 * i + 0]
            h = tf.get_collection_ref(name)[2 * i + 1]
            restored.append(tf.contrib.rnn.LSTMStateTuple(c, h))
        return tuple(restored)


    def import_ops(self):
        if self._is_training:
            self._train_op = tf.get_collection_ref('train_op')[0]
            self._lr = tf.get_collection_ref('lr')[0]
            self._new_lr = tf.get_collection_ref('new_lr')[0]
            self._lr_update = tf.get_collection_ref('lr_update')[0]
            rnn_params = tf.get_collection_ref('rnn_params')
            if self._cell and rnn_params:
