code: def test_gat_regression():
      # load datasets
      featurizer = MolGraphConvFeaturizer()
      tasks, dataset, transformers, metric = get_dataset(
          "regression", featurizer=featurizer
      )
  
      # initialize models
      n_tasks = len(tasks)
      model = GATModel(
          mode="regression",
          n_tasks=n_tasks,
          number_atom_features=30,
          batch_size=10,
          learning_rate=0.001,
      )
  
      # overfit test
      model.fit(dataset, nb_epoch=500)
      scores = model.evaluate(dataset, [metric], transformers)
      assert scores["mean_absolute_error"] < 0.5
  
      # test on a small MoleculeNet dataset
      from deepchem.molnet import load_delaney
  
      tasks, all_dataset, transformers = load_delaney(
          featurizer=featurizer
      )
      train_set, _, _ = all_dataset
      model = dc.models.GATModel(
          mode="regression",
          n_tasks=len(tasks),
          graph_attention_layers=[2],
          n_attention_heads=1,
          residual=False,
          predictor_hidden_feats=2,
      )
      model.fit(train_set, nb_epoch=1)
  
file_path: deepchem/deepchem/models/tests/test_gat.py
imports: import pytest
  import tempfile
  from flaky import flaky
  import numpy
  import deepchem
  from deepchem.feat import MolGraphConvFeaturizer
  from deepchem.models.tests.test_graph_models import get_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: test_gat_regression() without return types