text: """LeNet model for ADDA."""
  
  import torch.nn.functional as F
  from torch import nn
  
  
  class LeNetEncoder(nn.Module):
      """LeNet encoder model for ADDA."""
  
      def __init__(self):
          """Init LeNet encoder."""
          super(LeNetEncoder, self).__init__()
  
          self.restored = False
  
          self.encoder = nn.Sequential(
              # 1st conv layer
              # input [1 x 100 x 100]
              # output [20 x 24 x 24]
              nn.Conv2d(1, 20, kernel_size=4, stride=2),
              nn.MaxPool2d(kernel_size=2),
              nn.ReLU(),
              # 2nd conv layer
              # input [20 x 24 x 24]
              # output [50 x 5 x 5]
              nn.Conv2d(20, 50, kernel_size=4, stride=2),
              nn.Dropout2d(),
              nn.MaxPool2d(kernel_size=2),
              nn.ReLU()
          )
          self.fc1 = nn.Linear(50 * 5 * 5, 500)
  
      def forward(self, input):
          """Forward the LeNet."""
          conv_out = self.encoder(input)
          feat = self.fc1(conv_out.view(-1, 50 * 5 * 5))
          return feat
  
  
  class LeNetClassifier(nn.Module):
      """LeNet classifier model for ADDA."""
  
      def __init__(self):
          """Init LeNet encoder."""
          super(LeNetClassifier, self).__init__()
          self.fc2 = nn.Linear(500, 4)
  
      def forward(self, feat):
          """Forward the LeNet classifier."""
          out = F.dropout(F.relu(feat), training=self.training)
          out = self.fc2(out)
          return out
  