class_docstr: This class implements a classifier with the Jax framework.
class_docstr_tok: ["This","class","implements","a","classifier","with","the","Jax","framework","."]
docstr: Initialization specifically for the Jax-based implementation.
  
  :param model: Jax model, represented as a list of model parameters.
  :param predict_func: A function used to predict model output given the model and the input.
  :param loss_func: The loss function for which to compute gradients for training.
  :param update_func: The update function for which to train the model.
  :param input_shape: The shape of one input instance.
  :param nb_classes: The number of classes of the model.
  :param channels_first: Set channels first or last.
  :param clip_values: Tuple of the form `(min, max)` of floats or `np.ndarray` representing the minimum and
         maximum values allowed for features. If floats are provided, these will be used as the range of all
         features. If arrays are provided, each value will be considered the bound for a feature, thus
         the shape of clip values needs to match the total number of features.
  :param preprocessing_defences: Preprocessing defence(s) to be applied by the classifier.
  :param postprocessing_defences: Postprocessing defence(s) to be applied by the classifier.
  :param preprocessing: Tuple of the form `(subtrahend, divisor)` of floats or `np.ndarray` of values to be
         used for data preprocessing. The first value will be subtracted from the input. The input will then
         be divided by the second one.
docstr_tok: ["Initialization","specifically","for","the","Jax-based","implementation",".",":","param","model",":","Jax","model",",","represented","as","a","list","of","model","parameters",".",":","param","predict_func",":","A","function","used","to","predict","model","output","given","the","model","and","the","input",".",":","param","loss_func",":","The","loss","function","for","which","to","compute","gradients","for","training",".",":","param","update_func",":","The","update","function","for","which","to","train","the","model",".",":","param","input_shape",":","The","shape","of","one","input","instance",".",":","param","nb_classes",":","The","number","of","classes","of","the","model",".",":","param","channels_first",":","Set","channels","first","or","last",".",":","param","clip_values",":","Tuple","of","the","form","`","(","min",",","max",")","`","of","floats","or","`","np.ndarray","`","representing","the","minimum","and","maximum","values","allowed","for","features",".","If","floats","are","provided",",","these","will","be","used","as","the","range","of","all","features",".","If","arrays","are","provided",",","each","value","will","be","considered","the","bound","for","a","feature",",","thus","the","shape","of","clip","values","needs","to","match","the","total","number","of","features",".",":","param","preprocessing_defences",":","Preprocessing","defence","(","s",")","to","be","applied","by","the","classifier",".",":","param","postprocessing_defences",":","Postprocessing","defence","(","s",")","to","be","applied","by","the","classifier",".",":","param","preprocessing",":","Tuple","of","the","form","`","(","subtrahend",",","divisor",")","`","of","floats","or","`","np.ndarray","`","of","values","to","be","used","for","data","preprocessing",".","The","first","value","will","be","subtracted","from","the","input",".","The","input","will","then","be","divided","by","the","second","one","."]
code: def __init__(
      self,
      model: List,
      predict_func: Callable,
      loss_func: Callable,
      update_func: Callable,
      input_shape: Tuple[int, ...],
      nb_classes: int,
      channels_first: bool = False,
      clip_values: Optional["CLIP_VALUES_TYPE"] = None,
      preprocessing_defences: Union[
          "Preprocessor", List["Preprocessor"], None
      ] = None,
      postprocessing_defences: Union[
          "Postprocessor", List["Postprocessor"], None
      ] = None,
      preprocessing: "PREPROCESSING_TYPE" = (0.0, 1.0),
  ) -> None:
      """
      Initialization specifically for the Jax-based implementation.
  
      :param model: Jax model, represented as a list of model parameters.
      :param predict_func: A function used to predict model output given the model and the input.
      :param loss_func: The loss function for which to compute gradients for training.
      :param update_func: The update function for which to train the model.
      :param input_shape: The shape of one input instance.
      :param nb_classes: The number of classes of the model.
      :param channels_first: Set channels first or last.
      :param clip_values: Tuple of the form `(min, max)` of floats or `np.ndarray` representing the minimum and
             maximum values allowed for features. If floats are provided, these will be used as the range of all
             features. If arrays are provided, each value will be considered the bound for a feature, thus
             the shape of clip values needs to match the total number of features.
      :param preprocessing_defences: Preprocessing defence(s) to be applied by the classifier.
      :param postprocessing_defences: Postprocessing defence(s) to be applied by the classifier.
      :param preprocessing: Tuple of the form `(subtrahend, divisor)` of floats or `np.ndarray` of values to be
             used for data preprocessing. The first value will be subtracted from the input. The input will then
             be divided by the second one.
      """
      super().__init__(
          model=model,
          clip_values=clip_values,
          channels_first=channels_first,
          preprocessing_defences=preprocessing_defences,
          postprocessing_defences=postprocessing_defences,
          preprocessing=preprocessing,
      )
  
      self._predict_func = predict_func
      self._loss_func = loss_func
      self._update_func = update_func
      self._nb_classes = nb_classes
      self._input_shape = input_shape
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import random
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from art.estimators.classification.classifier import ClassGradientsMixin, ClassifierMixin
  from art.experimental.estimators.jax import JaxEstimator
label_desc: Use image node_id 1 to create a new JaxClassifier object from inherited base classes: ClassGradientsMixin, ClassifierMixin, JaxEstimator with example: obj = JaxClassifier(model, predict_func, loss_func, update_func, input_shape, nb_classes, channels_first, clip_values, preprocessing_defences, postprocessing_defences, preprocessing)