class_docstr: Implementation of GATNE model.
  
  Args:
      config: dict, some configure parameters.
      dataset: instance of Dataset class
      place: GPU or CPU place 
class_docstr_tok: ["Implementation","of","GATNE","model",".","Args",":","config",":","dict",",","some","configure","parameters",".","dataset",":","instance","of","Dataset","class","place",":","GPU","or","CPU","place"]
docstr: Calculate attention weights.
          
docstr_tok: ["Calculate","attention","weights","."]
code: def attention(self, node_type_embed, trans_w_s1, trans_w_s2):
      """Calculate attention weights."""
      attention = fl.tanh(fl.matmul(node_type_embed, trans_w_s1))
      attention = fl.matmul(attention, trans_w_s2)
      attention = fl.reshape(attention, [-1, self.u_num])
      attention = fl.softmax(attention)
      attention = fl.reshape(attention, [-1, self.att_head, self.u_num])
      return attention
  
file_path: PGL/legacy/examples/GATNE/model.py
imports: import numpy
  import math
  import logging
  import paddle.fluid
  import paddle.fluid.layers
  from pgl import heter_graph_wrapper
label_desc: Use image node_id 3 for calling the GATNE obj's underlying member method code with example usage: obj.attention(node_type_embed, trans_w_s1, trans_w_s2) and returns: attention