class_docstr: Implementation of the Copycat CNN attack from Rodrigues Correia-Silva et al. (2018).
  
  | Paper link: https://arxiv.org/abs/1806.05476
class_docstr_tok: ["Implementation","of","the","Copycat","CNN","attack","from","Rodrigues","Correia-Silva","et","al",".","(","2018",")",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1806.05476"]
docstr: Query the victim classifier.
  
  :param x: An array with the source input to the victim classifier.
  :return: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes).
docstr_tok: ["Query","the","victim","classifier",".",":","param","x",":","An","array","with","the","source","input","to","the","victim","classifier",".",":","return",":","Target","values","(","class","labels",")","one-hot-encoded","of","shape","(","nb_samples",",","nb_classes",")","."]
code: def _query_label(self, x: np.ndarray) -> np.ndarray:
      """
      Query the victim classifier.
  
      :param x: An array with the source input to the victim classifier.
      :return: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes).
      """
      labels = self.estimator.predict(
          x=x, batch_size=self.batch_size_query
      )
      if not self.use_probability:
          labels = np.argmax(labels, axis=1)
          labels = to_categorical(
              labels=labels, nb_classes=self.estimator.nb_classes
          )
  
      return labels
  
file_path: adversarial-robustness-toolbox/art/attacks/extraction/copycat_cnn.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING
  import numpy
  from art.config import ART_NUMPY_DTYPE
  from art.attacks.attack import ExtractionAttack
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import to_categorical
label_desc: Use image node_id 4 for calling the CopycatCNN obj's underlying member method code with example usage: obj._query_label(x) and returns: labels