import tensorflow as tf

            raise RuntimeError('type error {}'.format(self._var_list))
        assert len(restore_key2vars) > 0
        restore_key2vars = sorted([(k, v) for k, v in restore_key2vars.items() if k in saved_shapes])
        msg = []
        var_list = dict()
        with tf.variable_scope('', reuse=True):
            for key, var in restore_key2vars:
                var_shape = var.get_shape().as_list()
                if var_shape == saved_shapes[key]:
                    var_list[key] = var
