class_docstr: ## Graph Attention Network (GAT)
  
  This graph attention network has two [graph attention layers](index.html).
class_docstr_tok: ["#","#","Graph","Attention","Network","(","GAT",")","This","graph","attention","network","has","two","[","graph","attention","layers","]","(","index.html",")","."]
docstr: * `x` is the features vectors of shape `[n_nodes, in_features]`
  * `adj_mat` is the adjacency matrix of the form
   `[n_nodes, n_nodes, n_heads]` or `[n_nodes, n_nodes, 1]`
docstr_tok: ["*","`","x","`","is","the","features","vectors","of","shape","`","[","n_nodes",",","in_features","]","`","*","`","adj_mat","`","is","the","adjacency","matrix","of","the","form","`","[","n_nodes",",","n_nodes",",","n_heads","]","`","or","`","[","n_nodes",",","n_nodes",",","1","]","`"]
code: def forward(self, x: torch.Tensor, adj_mat: torch.Tensor):
      """
      * `x` is the features vectors of shape `[n_nodes, in_features]`
      * `adj_mat` is the adjacency matrix of the form
       `[n_nodes, n_nodes, n_heads]` or `[n_nodes, n_nodes, 1]`
      """
      # Apply dropout to the input
      x = self.dropout(x)
      # First graph attention layer
      x = self.layer1(x, adj_mat)
      # Activation function
      x = self.activation(x)
      # Dropout
      x = self.dropout(x)
      # Output layer (without activation) for logits
      return self.output(x, adj_mat)
  
imports: from typing import Dict
  import numpy
  import torch
  from torch import nn
  from labml import lab, monit, tracker, experiment
  from labml.configs import BaseConfigs, option, calculate
  from labml.utils import download
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.module import Module
  from labml_nn.graphs.gat import GraphAttentionLayer
  from labml_nn.optimizers.configs import OptimizerConfigs
label_desc: Use image node_id 2 for calling the GAT obj's underlying member method code with example usage: obj.forward(x, adj_mat) and returns: self