code: def __init__(self, n_classes):
      # Overriding initial class
      super(CNN, self).__init__()
  
      # Creates sequential model for convolutional part
      self.conv = torch.nn.Sequential()
  
      # First convolutional block
      # Pay extremely attention when matching tensor dimensions
      self.conv.add_module(
          "conv_1", torch.nn.Conv2d(1, 4, kernel_size=2)
      )
      self.conv.add_module("dropout_1", torch.nn.Dropout())
      self.conv.add_module(
          "maxpool_1", torch.nn.MaxPool2d(kernel_size=2)
      )
      self.conv.add_module("relu_1", torch.nn.ReLU())
  
      # Second convolutional block
      # Same apply for this step
      self.conv.add_module(
          "conv_2", torch.nn.Conv2d(4, 8, kernel_size=2)
      )
      self.conv.add_module("dropout_2", torch.nn.Dropout())
      self.conv.add_module(
          "maxpool_2", torch.nn.MaxPool2d(kernel_size=2)
      )
      self.conv.add_module("relu_2", torch.nn.ReLU())
  
      # Creates sequential model for fully connected part
      self.fc = torch.nn.Sequential()
  
      # Fully connected block
      self.fc.add_module("fc1", torch.nn.Linear(8, 32))
      self.fc.add_module("relu_3", torch.nn.ReLU())
      self.fc.add_module("dropout_3", torch.nn.Dropout())
      self.fc.add_module("fc2", torch.nn.Linear(32, n_classes))
  
file_path: opytimizer/examples/integrations/pytorch/cnn.py
imports: import numpy
  import torch
  from sklearn.datasets import load_digits
  from sklearn.model_selection import train_test_split
  from torch import optim
  from torch.autograd import Variable
  from opytimizer import Opytimizer
  from opytimizer.core import Function
  from opytimizer.optimizers.swarm import PSO
  from opytimizer.spaces import SearchSpace
label_desc: Use image node_id 1 to create a new CNN object from inherited base classes: torch.nn with example: obj = CNN(n_classes)