class_docstr: Establish the network structure for a CNN.
  
  Adapted from the implementation used in [1]
  
  Parameters
  ----------
  kernel_size : int, default = 7
      specifying the length of the 1D convolution window
  avg_pool_size : int, default = 3
      size of the average pooling windows
  n_conv_layers : int, default = 2
      the number of convolutional plus average pooling layers
  filter_sizes : array of int, shape = (nb_conv_layers)
  activation : string, default = sigmoid
      keras activation function
  padding : string, default = "auto"
      Controls padding logic for the convolutional layers,
      i.e. whether ``'valid'`` and ``'same'`` are passed to the ``Conv1D`` layer.
      - "auto": as per original implementation, ``"sam"`` is passed if
        ``input_shape[0] < 60`` in the input layer, and ``"valid"`` otherwise.
      - "valid", "same", and other values are passed directly to ``Conv1D``
  random_state    : int, default = 0
      seed to any needed random actions
  
  Notes
  -----
  Adapted from source code
  https://github.com/hfawaz/dl-4-tsc/blob/master/classifiers/cnn.py
  
  References
  ----------
  .. [1] Zhao et al. Convolutional neural networks for time series classification,
  Journal of Systems Engineering and Electronics 28(1), 162--169, 2017
class_docstr_tok: ["Establish","the","network","structure","for","a","CNN",".","Adapted","from","the","implementation","used","in","[","1","]","Parameters","--","--","--","--","--","kernel_size",":","int",",","default","=","7","specifying","the","length","of","the","1D","convolution","window","avg_pool_size",":","int",",","default","=","3","size","of","the","average","pooling","windows","n_conv_layers",":","int",",","default","=","2","the","number","of","convolutional","plus","average","pooling","layers","filter_sizes",":","array","of","int",",","shape","=","(","nb_conv_layers",")","activation",":","string",",","default","=","sigmoid","keras","activation","function","padding",":","string",",","default","=","``","auto","''","Controls","padding","logic","for","the","convolutional","layers",",","i.e",".","whether","``","'valid","'","``","and","``","'same","'","``","are","passed","to","the","``","Conv1D","``","layer",".","-","``","auto","''",":","as","per","original","implementation",",","``","``","sam","''","``","is","passed","if","``","input_shape","[","0","]","<","60","``","in","the","input","layer",",","and","``","``","valid","''","``","otherwise",".","-","``","valid","''",",","``","same","''",",","and","other","values","are","passed","directly","to","``","Conv1D","``","random_state",":","int",",","default","=","0","seed","to","any","needed","random","actions","Notes","--","--","-","Adapted","from","source","code","https",":","\/\/github.com\/hfawaz\/dl-4-tsc\/blob\/master\/classifiers\/cnn.py","References","--","--","--","--","--","..","[","1","]","Zhao","et","al",".","Convolutional","neural","networks","for","time","series","classification",",","Journal","of","Systems","Engineering","and","Electronics","28","(","1",")",",","162","--","169",",","2017"]
code: def __init__(
      self,
      kernel_size=7,
      avg_pool_size=3,
      n_conv_layers=2,
      filter_sizes=None,
      activation="sigmoid",
      padding="auto",
      random_state=0,
  ):
      _check_dl_dependencies(severity="error")
      self.random_state = random_state
      self.padding = padding
      self.kernel_size = kernel_size
      self.avg_pool_size = avg_pool_size
      self.n_conv_layers = n_conv_layers
      self.filter_sizes = None
      if filter_sizes is None:
          self._filter_sizes = [6, 12]
      else:
          self._filter_sizes = filter_sizes
      self.activation = activation
  
      super().__init__()
  
imports: from sktime.networks.base import BaseDeepNetwork
  from sktime.utils.validation._dependencies import _check_dl_dependencies
label_desc: Use image node_id 1 to create a new CNNNetwork object from inherited base classes: BaseDeepNetwork with example: obj = CNNNetwork(kernel_size, avg_pool_size, n_conv_layers, filter_sizes, activation, padding, random_state)