class_docstr: Generates attention head using GroverMPNEncoder for generating query, key and value
  
  Parameters
  ----------
  hidden_size: int
      Dimension of hidden layer
  undirected: bool
      If set to `True`, the graph is considered as an undirected graph.
  depth: int
      number of hops in a message passing iteration
  atom_messages: bool
      True if encoding atom-messages else False.
class_docstr_tok: ["Generates","attention","head","using","GroverMPNEncoder","for","generating","query",",","key","and","value","Parameters","--","--","--","--","--","hidden_size",":","int","Dimension","of","hidden","layer","undirected",":","bool","If","set","to","`","True","`",",","the","graph","is","considered","as","an","undirected","graph",".","depth",":","int","number","of","hops","in","a","message","passing","iteration","atom_messages",":","bool","True","if","encoding","atom-messages","else","False","."]
code: def forward(self, f_atoms, f_bonds, a2b, a2a, b2a, b2revb):
      if self.atom_messages:
          init_messages = f_atoms
          init_attached_features = f_bonds
          a2nei = a2a
          a2attached = a2b
          b2a = b2a
          b2revb = b2revb
      else:
          # self.atom_messages is False
          init_messages = f_bonds
          init_attached_features = f_atoms
          a2nei = a2b
          a2attached = a2a
          b2a = b2a
          b2revb = b2revb
  
      q = self.mpn_q(
          init_messages=init_messages,
          init_attached_features=init_attached_features,
          a2nei=a2nei,
          a2attached=a2attached,
          b2a=b2a,
          b2revb=b2revb,
      )
      k = self.mpn_k(
          init_messages=init_messages,
          init_attached_features=init_attached_features,
          a2nei=a2nei,
          a2attached=a2attached,
          b2a=b2a,
          b2revb=b2revb,
      )
      v = self.mpn_v(
          init_messages=init_messages,
          init_attached_features=init_attached_features,
          a2nei=a2nei,
          a2attached=a2attached,
          b2a=b2a,
          b2revb=b2revb,
      )
      return q, k, v
  
imports: from typing import List, Dict
  import numpy
  from scipy import stats
  from deepchem.models.torch_models.readout import GroverReadout
  from deepchem.models.torch_models.layers import SublayerConnection, PositionwiseFeedForward
label_desc: Use image node_id 2 for calling the GroverAttentionHead obj's underlying member method code with example usage: obj.forward(f_atoms, f_bonds, a2b, a2a, b2a, b2revb) and returns: q,  k,  v