Hi Arul, sure can:
class Model(nn.Module):
  def __init__(self, word_dim, annotation_dim, attention_dim, hidden_dim, context_dim, vocab_size=111):
    super(Model, self).__init__()
    
    #Variables
    self.word_dim = word_dim
    self.annotation_dim = annotation_dim
    self.attention_dim = attention_dim
    self.hidden_dim = hidden_dim
    self.context_dim = context_dim
    self.vocab_size = vocab_size
    
    #Components
    self.encoder = Encoder().to(device) #FCN encoder
    self.decoder = Decoder(word_dim=self.word_dim, annotation_dim=self.annotation_dim, 
                           attention_dim=self.attention_dim, hidden_dim=self.hidden_dim, 
                           context_dim=self.context_dim, vocab_size=self.vocab_size).to(device) #Decoder with custom Attention model and GRU
    
  def forward(self, image_batch, label):
    
    #fcn_output is raw output for attention visualization
    #alphas are attention weights for attention visualization
    
    fcn_output, annotations = self.encoder(image_batch.unsqueeze(0).float().to(device))
        
    alphas, predictions = self.decoder(annotations, self.decoder.initHidden(), label) #predictions for this sequence (set of probabilties)
    
    return fcn_output, alphas, predictions