class_docstr: Close implementation of Feature Collision Poisoning Attack by Shafahi, Huang, et al 2018.
  "Poison Frogs! Targeted Clean-Label Poisoning Attacks on Neural Networks"
  
  This implementation dynamically calculates the dimension of the feature layer, and doesn't hardcode this
  value to 2048 as done in the paper. Thus we recommend using larger values for the similarity_coefficient.
  
  | Paper link: https://arxiv.org/abs/1804.00792
class_docstr_tok: ["Close","implementation","of","Feature","Collision","Poisoning","Attack","by","Shafahi",",","Huang",",","et","al","2018",".","``","Poison","Frogs","!","Targeted","Clean-Label","Poisoning","Attacks","on","Neural","Networks","''","This","implementation","dynamically","calculates","the","dimension","of","the","feature","layer",",","and","does","n't","hardcode","this","value","to","2048","as","done","in","the","paper",".","Thus","we","recommend","using","larger","values","for","the","similarity_coefficient",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1804.00792"]
code: def _check_params(self) -> None:
      if self.learning_rate <= 0:
          raise ValueError("Learning rate must be strictly positive")
  
      if not isinstance(self.feature_layer, (str, int)):
          raise TypeError("Feature layer should be a string or int")
  
      if self.decay_coeff <= 0:
          raise ValueError("Decay coefficient must be positive")
  
      if self.stopping_tol <= 0:
          raise ValueError("Stopping tolerance must be positive")
  
      if self.obj_threshold and self.obj_threshold <= 0:
          raise ValueError("Objective threshold must be positive")
  
      if self.num_old_obj <= 0:
          raise ValueError(
              "Number of old stored objectives must be positive"
          )
  
      if self.max_iter <= 0:
          raise ValueError(
              "Maximum number of iterations must be 1 or larger"
          )
  
      if self.watermark and not (
          isinstance(self.watermark, float) and 0 <= self.watermark < 1
      ):
          raise ValueError("Watermark must be between 0 and 1")
  
      if not isinstance(self.verbose, bool):
          raise ValueError(
              "The argument `verbose` has to be of type bool."
          )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from functools import reduce
  import logging
  from typing import Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import PoisoningAttackWhiteBox
  from art.estimators import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.estimators.classification.keras import KerasClassifier
  from art.estimators.classification.pytorch import PyTorchClassifier
label_desc: Use image node_id 6 for calling the FeatureCollisionAttack obj's underlying member method code with example usage: obj._check_params() without return types