@override(TFPolicy)
def copy(self, existing_inputs):
    'Creates a copy of self using existing input placeholders.'
    if self._state_inputs:
        num_state_inputs = (len(self._state_inputs) + 1)
    else:
        num_state_inputs = 0
    if ((len(self._loss_inputs) + num_state_inputs) != len(existing_inputs)):
        raise ValueError('Tensor list mismatch', self._loss_inputs, self._state_inputs, existing_inputs)
    for (i, (k, v)) in enumerate(self._loss_inputs):
        if (v.shape.as_list() != existing_inputs[i].shape.as_list()):
            raise ValueError('Tensor shape mismatch', i, k, v.shape, existing_inputs[i].shape)
    rnn_inputs = []
    for i in range(len(self._state_inputs)):
        rnn_inputs.append(('state_in_{}'.format(i), existing_inputs[(len(self._loss_inputs) + i)]))
    if rnn_inputs:
        rnn_inputs.append(('seq_lens', existing_inputs[(- 1)]))
    input_dict = OrderedDict(([(k, existing_inputs[i]) for (i, (k, _)) in enumerate(self._loss_inputs)] + rnn_inputs))
    instance = self.__class__(self.observation_space, self.action_space, self.config, existing_inputs=input_dict, existing_model=self.model)
    instance._loss_input_dict = input_dict
    loss = instance._do_loss_init(input_dict)
    loss_inputs = [(k, existing_inputs[i]) for (i, (k, _)) in enumerate(self._loss_inputs)]
    TFPolicy._initialize_loss(instance, loss, loss_inputs)
    if instance._grad_stats_fn:
        instance._stats_fetches.update(instance._grad_stats_fn(instance, input_dict, instance._grads))
    return instance
Creates a copy of self using existing input placeholders.
@override(TFPolicy)
def copy(self, existing_inputs):
    
    if self._state_inputs:
        num_state_inputs = (len(self._state_inputs) + 1)
    else:
        num_state_inputs = 0
    if ((len(self._loss_inputs) + num_state_inputs) != len(existing_inputs)):
        raise ValueError('Tensor list mismatch', self._loss_inputs, self._state_inputs, existing_inputs)
    for (i, (k, v)) in enumerate(self._loss_inputs):
        if (v.shape.as_list() != existing_inputs[i].shape.as_list()):
            raise ValueError('Tensor shape mismatch', i, k, v.shape, existing_inputs[i].shape)
    rnn_inputs = []
    for i in range(len(self._state_inputs)):
        rnn_inputs.append(('state_in_{}'.format(i), existing_inputs[(len(self._loss_inputs) + i)]))
    if rnn_inputs:
        rnn_inputs.append(('seq_lens', existing_inputs[(- 1)]))
    input_dict = OrderedDict(([(k, existing_inputs[i]) for (i, (k, _)) in enumerate(self._loss_inputs)] + rnn_inputs))
    instance = self.__class__(self.observation_space, self.action_space, self.config, existing_inputs=input_dict, existing_model=self.model)
    instance._loss_input_dict = input_dict
    loss = instance._do_loss_init(input_dict)
    loss_inputs = [(k, existing_inputs[i]) for (i, (k, _)) in enumerate(self._loss_inputs)]
    TFPolicy._initialize_loss(instance, loss, loss_inputs)
    if instance._grad_stats_fn:
        instance._stats_fetches.update(instance._grad_stats_fn(instance, input_dict, instance._grads))
    return instance