We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Running error on examples/pytorch/gat/train.py 
## 🐛 Bug

When running the cpu version of gat, an error is reported, indicating that cuda is not supported.

## To Reproduce

Steps to reproduce the behavior:

python train.py --dataset=cora --gpu=-1

Traceback (most recent call last):
  File "train.py", line 181, in <module>
    main(args)
  File "train.py", line 110, in main
    torch.cuda.synchronize()
  File "/opt/homebrew/Caskroom/miniconda/base/envs/dgl/lib/python3.8/site-packages/torch/cuda/__init__.py", line 493, in synchronize
    _lazy_init()
  File "/opt/homebrew/Caskroom/miniconda/base/envs/dgl/lib/python3.8/site-packages/torch/cuda/__init__.py", line 210, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled


## Expected behavior

The example should run successful.

## Environment

 - DGL Version (e.g., 1.0): 0.8.1
 - Backend Library & Version (e.g., PyTorch 0.4.1, MXNet/Gluon 1.3):1.11.0
 - OS (e.g., Linux): macOS 12.3.1 
 - How you installed DGL (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source): 
 - Python version: 3.8.13
 - CUDA/cuDNN version (if applicable):
 - GPU models and configuration (e.g. V100):
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->

It seems that the conditional judgment of cuda is missing here (line 110 and 121).

https://github.com/dmlc/dgl/blob/4b87e47f15552cb27ddf8e594769ad0361d06627/examples/pytorch/gat/train.py#L109-L111

https://github.com/dmlc/dgl/blob/4b87e47f15552cb27ddf8e594769ad0361d06627/examples/pytorch/gat/train.py#L120-L122


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `examples/pytorch/gat/train.py`
Content:
```
1 """
2 Graph Attention Networks in DGL using SPMV optimization.
3 Multiple heads are also batched together for faster training.
4 References
5 ----------
6 Paper: https://arxiv.org/abs/1710.10903
7 Author's code: https://github.com/PetarV-/GAT
8 Pytorch implementation: https://github.com/Diego999/pyGAT
9 """
10 
11 import argparse
12 import numpy as np
13 import networkx as nx
14 import time
15 import torch
16 import torch.nn.functional as F
17 import dgl
18 from dgl.data import register_data_args
19 from dgl.data import CoraGraphDataset, CiteseerGraphDataset, PubmedGraphDataset
20 
21 from gat import GAT
22 from utils import EarlyStopping
23 
24 
25 def accuracy(logits, labels):
26     _, indices = torch.max(logits, dim=1)
27     correct = torch.sum(indices == labels)
28     return correct.item() * 1.0 / len(labels)
29 
30 
31 def evaluate(model, features, labels, mask):
32     model.eval()
33     with torch.no_grad():
34         logits = model(features)
35         logits = logits[mask]
36         labels = labels[mask]
37         return accuracy(logits, labels)
38 
39 
40 def main(args):
41     # load and preprocess dataset
42     if args.dataset == 'cora':
43         data = CoraGraphDataset()
44     elif args.dataset == 'citeseer':
45         data = CiteseerGraphDataset()
46     elif args.dataset == 'pubmed':
47         data = PubmedGraphDataset()
48     else:
49         raise ValueError('Unknown dataset: {}'.format(args.dataset))
50 
51     g = data[0]
52     if args.gpu < 0:
53         cuda = False
54     else:
55         cuda = True
56         g = g.int().to(args.gpu)
57 
58     features = g.ndata['feat']
59     labels = g.ndata['label']
60     train_mask = g.ndata['train_mask']
61     val_mask = g.ndata['val_mask']
62     test_mask = g.ndata['test_mask']
63     num_feats = features.shape[1]
64     n_classes = data.num_labels
65     n_edges = data.graph.number_of_edges()
66     print("""----Data statistics------'
67       #Edges %d
68       #Classes %d
69       #Train samples %d
70       #Val samples %d
71       #Test samples %d""" %
72           (n_edges, n_classes,
73            train_mask.int().sum().item(),
74            val_mask.int().sum().item(),
75            test_mask.int().sum().item()))
76 
77     # add self loop
78     g = dgl.remove_self_loop(g)
79     g = dgl.add_self_loop(g)
80     n_edges = g.number_of_edges()
81     # create model
82     heads = ([args.num_heads] * (args.num_layers-1)) + [args.num_out_heads]
83     model = GAT(g,
84                 args.num_layers,
85                 num_feats,
86                 args.num_hidden,
87                 n_classes,
88                 heads,
89                 F.elu,
90                 args.in_drop,
91                 args.attn_drop,
92                 args.negative_slope,
93                 args.residual)
94     print(model)
95     if args.early_stop:
96         stopper = EarlyStopping(patience=100)
97     if cuda:
98         model.cuda()
99     loss_fcn = torch.nn.CrossEntropyLoss()
100 
101     # use optimizer
102     optimizer = torch.optim.Adam(
103         model.parameters(), lr=args.lr, weight_decay=args.weight_decay)
104 
105     # initialize graph
106     dur = []
107     for epoch in range(args.epochs):
108         model.train()
109         if epoch >= 3:
110             torch.cuda.synchronize()
111             t0 = time.time()
112         # forward
113         logits = model(features)
114         loss = loss_fcn(logits[train_mask], labels[train_mask])
115 
116         optimizer.zero_grad()
117         loss.backward()
118         optimizer.step()
119 
120         if epoch >= 3:
121             torch.cuda.synchronize()
122             dur.append(time.time() - t0)
123 
124         train_acc = accuracy(logits[train_mask], labels[train_mask])
125 
126         if args.fastmode:
127             val_acc = accuracy(logits[val_mask], labels[val_mask])
128         else:
129             val_acc = evaluate(model, features, labels, val_mask)
130             if args.early_stop:
131                 if stopper.step(val_acc, model):
132                     break
133 
134         print("Epoch {:05d} | Time(s) {:.4f} | Loss {:.4f} | TrainAcc {:.4f} |"
135               " ValAcc {:.4f} | ETputs(KTEPS) {:.2f}".
136               format(epoch, np.mean(dur), loss.item(), train_acc,
137                      val_acc, n_edges / np.mean(dur) / 1000))
138 
139     print()
140     if args.early_stop:
141         model.load_state_dict(torch.load('es_checkpoint.pt'))
142     acc = evaluate(model, features, labels, test_mask)
143     print("Test Accuracy {:.4f}".format(acc))
144 
145 
146 if __name__ == '__main__':
147 
148     parser = argparse.ArgumentParser(description='GAT')
149     register_data_args(parser)
150     parser.add_argument("--gpu", type=int, default=-1,
151                         help="which GPU to use. Set -1 to use CPU.")
152     parser.add_argument("--epochs", type=int, default=200,
153                         help="number of training epochs")
154     parser.add_argument("--num-heads", type=int, default=8,
155                         help="number of hidden attention heads")
156     parser.add_argument("--num-out-heads", type=int, default=1,
157                         help="number of output attention heads")
158     parser.add_argument("--num-layers", type=int, default=2,
159                         help="number of hidden layers")
160     parser.add_argument("--num-hidden", type=int, default=8,
161                         help="number of hidden units")
162     parser.add_argument("--residual", action="store_true", default=False,
163                         help="use residual connection")
164     parser.add_argument("--in-drop", type=float, default=.6,
165                         help="input feature dropout")
166     parser.add_argument("--attn-drop", type=float, default=.6,
167                         help="attention dropout")
168     parser.add_argument("--lr", type=float, default=0.005,
169                         help="learning rate")
170     parser.add_argument('--weight-decay', type=float, default=5e-4,
171                         help="weight decay")
172     parser.add_argument('--negative-slope', type=float, default=0.2,
173                         help="the negative slope of leaky relu")
174     parser.add_argument('--early-stop', action='store_true', default=False,
175                         help="indicates whether to use early stop or not")
176     parser.add_argument('--fastmode', action="store_true", default=False,
177                         help="skip re-evaluate the validation set")
178     args = parser.parse_args()
179     print(args)
180 
181     main(args)
182
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/examples/pytorch/gat/train.py b/examples/pytorch/gat/train.py
--- a/examples/pytorch/gat/train.py
+++ b/examples/pytorch/gat/train.py
@@ -107,7 +107,8 @@
     for epoch in range(args.epochs):
         model.train()
         if epoch >= 3:
-            torch.cuda.synchronize()
+            if cuda:
+                torch.cuda.synchronize()
             t0 = time.time()
         # forward
         logits = model(features)
@@ -118,7 +119,8 @@
         optimizer.step()
 
         if epoch >= 3:
-            torch.cuda.synchronize()
+            if cuda:
+                torch.cuda.synchronize()
             dur.append(time.time() - t0)
 
         train_acc = accuracy(logits[train_mask], labels[train_mask])

{"golden_diff": "diff --git a/examples/pytorch/gat/train.py b/examples/pytorch/gat/train.py\n--- a/examples/pytorch/gat/train.py\n+++ b/examples/pytorch/gat/train.py\n@@ -107,7 +107,8 @@\n     for epoch in range(args.epochs):\n         model.train()\n         if epoch >= 3:\n-            torch.cuda.synchronize()\n+            if cuda:\n+                torch.cuda.synchronize()\n             t0 = time.time()\n         # forward\n         logits = model(features)\n@@ -118,7 +119,8 @@\n         optimizer.step()\n \n         if epoch >= 3:\n-            torch.cuda.synchronize()\n+            if cuda:\n+                torch.cuda.synchronize()\n             dur.append(time.time() - t0)\n \n         train_acc = accuracy(logits[train_mask], labels[train_mask])\n", "issue": "Running error on examples/pytorch/gat/train.py \n## \ud83d\udc1b Bug\r\n\r\nWhen running the cpu version of gat, an error is reported, indicating that cuda is not supported.\r\n\r\n## To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\npython train.py --dataset=cora --gpu=-1\r\n\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 181, in <module>\r\n    main(args)\r\n  File \"train.py\", line 110, in main\r\n    torch.cuda.synchronize()\r\n  File \"/opt/homebrew/Caskroom/miniconda/base/envs/dgl/lib/python3.8/site-packages/torch/cuda/__init__.py\", line 493, in synchronize\r\n    _lazy_init()\r\n  File \"/opt/homebrew/Caskroom/miniconda/base/envs/dgl/lib/python3.8/site-packages/torch/cuda/__init__.py\", line 210, in _lazy_init\r\n    raise AssertionError(\"Torch not compiled with CUDA enabled\")\r\nAssertionError: Torch not compiled with CUDA enabled\r\n\r\n\r\n## Expected behavior\r\n\r\nThe example should run successful.\r\n\r\n## Environment\r\n\r\n - DGL Version (e.g., 1.0): 0.8.1\r\n - Backend Library & Version (e.g., PyTorch 0.4.1, MXNet/Gluon 1.3):1.11.0\r\n - OS (e.g., Linux): macOS 12.3.1 \r\n - How you installed DGL (`conda`, `pip`, source): conda\r\n - Build command you used (if compiling from source): \r\n - Python version: 3.8.13\r\n - CUDA/cuDNN version (if applicable):\r\n - GPU models and configuration (e.g. V100):\r\n - Any other relevant information:\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n\r\nIt seems that the conditional judgment of cuda is missing here (line 110 and 121).\r\n\r\nhttps://github.com/dmlc/dgl/blob/4b87e47f15552cb27ddf8e594769ad0361d06627/examples/pytorch/gat/train.py#L109-L111\r\n\r\nhttps://github.com/dmlc/dgl/blob/4b87e47f15552cb27ddf8e594769ad0361d06627/examples/pytorch/gat/train.py#L120-L122\r\n\n", "before_files": [{"content": "\"\"\"\nGraph Attention Networks in DGL using SPMV optimization.\nMultiple heads are also batched together for faster training.\nReferences\n----------\nPaper: https://arxiv.org/abs/1710.10903\nAuthor's code: https://github.com/PetarV-/GAT\nPytorch implementation: https://github.com/Diego999/pyGAT\n\"\"\"\n\nimport argparse\nimport numpy as np\nimport networkx as nx\nimport time\nimport torch\nimport torch.nn.functional as F\nimport dgl\nfrom dgl.data import register_data_args\nfrom dgl.data import CoraGraphDataset, CiteseerGraphDataset, PubmedGraphDataset\n\nfrom gat import GAT\nfrom utils import EarlyStopping\n\n\ndef accuracy(logits, labels):\n    _, indices = torch.max(logits, dim=1)\n    correct = torch.sum(indices == labels)\n    return correct.item() * 1.0 / len(labels)\n\n\ndef evaluate(model, features, labels, mask):\n    model.eval()\n    with torch.no_grad():\n        logits = model(features)\n        logits = logits[mask]\n        labels = labels[mask]\n        return accuracy(logits, labels)\n\n\ndef main(args):\n    # load and preprocess dataset\n    if args.dataset == 'cora':\n        data = CoraGraphDataset()\n    elif args.dataset == 'citeseer':\n        data = CiteseerGraphDataset()\n    elif args.dataset == 'pubmed':\n        data = PubmedGraphDataset()\n    else:\n        raise ValueError('Unknown dataset: {}'.format(args.dataset))\n\n    g = data[0]\n    if args.gpu < 0:\n        cuda = False\n    else:\n        cuda = True\n        g = g.int().to(args.gpu)\n\n    features = g.ndata['feat']\n    labels = g.ndata['label']\n    train_mask = g.ndata['train_mask']\n    val_mask = g.ndata['val_mask']\n    test_mask = g.ndata['test_mask']\n    num_feats = features.shape[1]\n    n_classes = data.num_labels\n    n_edges = data.graph.number_of_edges()\n    print(\"\"\"----Data statistics------'\n      #Edges %d\n      #Classes %d\n      #Train samples %d\n      #Val samples %d\n      #Test samples %d\"\"\" %\n          (n_edges, n_classes,\n           train_mask.int().sum().item(),\n           val_mask.int().sum().item(),\n           test_mask.int().sum().item()))\n\n    # add self loop\n    g = dgl.remove_self_loop(g)\n    g = dgl.add_self_loop(g)\n    n_edges = g.number_of_edges()\n    # create model\n    heads = ([args.num_heads] * (args.num_layers-1)) + [args.num_out_heads]\n    model = GAT(g,\n                args.num_layers,\n                num_feats,\n                args.num_hidden,\n                n_classes,\n                heads,\n                F.elu,\n                args.in_drop,\n                args.attn_drop,\n                args.negative_slope,\n                args.residual)\n    print(model)\n    if args.early_stop:\n        stopper = EarlyStopping(patience=100)\n    if cuda:\n        model.cuda()\n    loss_fcn = torch.nn.CrossEntropyLoss()\n\n    # use optimizer\n    optimizer = torch.optim.Adam(\n        model.parameters(), lr=args.lr, weight_decay=args.weight_decay)\n\n    # initialize graph\n    dur = []\n    for epoch in range(args.epochs):\n        model.train()\n        if epoch >= 3:\n            torch.cuda.synchronize()\n            t0 = time.time()\n        # forward\n        logits = model(features)\n        loss = loss_fcn(logits[train_mask], labels[train_mask])\n\n        optimizer.zero_grad()\n        loss.backward()\n        optimizer.step()\n\n        if epoch >= 3:\n            torch.cuda.synchronize()\n            dur.append(time.time() - t0)\n\n        train_acc = accuracy(logits[train_mask], labels[train_mask])\n\n        if args.fastmode:\n            val_acc = accuracy(logits[val_mask], labels[val_mask])\n        else:\n            val_acc = evaluate(model, features, labels, val_mask)\n            if args.early_stop:\n                if stopper.step(val_acc, model):\n                    break\n\n        print(\"Epoch {:05d} | Time(s) {:.4f} | Loss {:.4f} | TrainAcc {:.4f} |\"\n              \" ValAcc {:.4f} | ETputs(KTEPS) {:.2f}\".\n              format(epoch, np.mean(dur), loss.item(), train_acc,\n                     val_acc, n_edges / np.mean(dur) / 1000))\n\n    print()\n    if args.early_stop:\n        model.load_state_dict(torch.load('es_checkpoint.pt'))\n    acc = evaluate(model, features, labels, test_mask)\n    print(\"Test Accuracy {:.4f}\".format(acc))\n\n\nif __name__ == '__main__':\n\n    parser = argparse.ArgumentParser(description='GAT')\n    register_data_args(parser)\n    parser.add_argument(\"--gpu\", type=int, default=-1,\n                        help=\"which GPU to use. Set -1 to use CPU.\")\n    parser.add_argument(\"--epochs\", type=int, default=200,\n                        help=\"number of training epochs\")\n    parser.add_argument(\"--num-heads\", type=int, default=8,\n                        help=\"number of hidden attention heads\")\n    parser.add_argument(\"--num-out-heads\", type=int, default=1,\n                        help=\"number of output attention heads\")\n    parser.add_argument(\"--num-layers\", type=int, default=2,\n                        help=\"number of hidden layers\")\n    parser.add_argument(\"--num-hidden\", type=int, default=8,\n                        help=\"number of hidden units\")\n    parser.add_argument(\"--residual\", action=\"store_true\", default=False,\n                        help=\"use residual connection\")\n    parser.add_argument(\"--in-drop\", type=float, default=.6,\n                        help=\"input feature dropout\")\n    parser.add_argument(\"--attn-drop\", type=float, default=.6,\n                        help=\"attention dropout\")\n    parser.add_argument(\"--lr\", type=float, default=0.005,\n                        help=\"learning rate\")\n    parser.add_argument('--weight-decay', type=float, default=5e-4,\n                        help=\"weight decay\")\n    parser.add_argument('--negative-slope', type=float, default=0.2,\n                        help=\"the negative slope of leaky relu\")\n    parser.add_argument('--early-stop', action='store_true', default=False,\n                        help=\"indicates whether to use early stop or not\")\n    parser.add_argument('--fastmode', action=\"store_true\", default=False,\n                        help=\"skip re-evaluate the validation set\")\n    args = parser.parse_args()\n    print(args)\n\n    main(args)\n", "path": "examples/pytorch/gat/train.py"}], "after_files": [{"content": "\"\"\"\nGraph Attention Networks in DGL using SPMV optimization.\nMultiple heads are also batched together for faster training.\nReferences\n----------\nPaper: https://arxiv.org/abs/1710.10903\nAuthor's code: https://github.com/PetarV-/GAT\nPytorch implementation: https://github.com/Diego999/pyGAT\n\"\"\"\n\nimport argparse\nimport numpy as np\nimport networkx as nx\nimport time\nimport torch\nimport torch.nn.functional as F\nimport dgl\nfrom dgl.data import register_data_args\nfrom dgl.data import CoraGraphDataset, CiteseerGraphDataset, PubmedGraphDataset\n\nfrom gat import GAT\nfrom utils import EarlyStopping\n\n\ndef accuracy(logits, labels):\n    _, indices = torch.max(logits, dim=1)\n    correct = torch.sum(indices == labels)\n    return correct.item() * 1.0 / len(labels)\n\n\ndef evaluate(model, features, labels, mask):\n    model.eval()\n    with torch.no_grad():\n        logits = model(features)\n        logits = logits[mask]\n        labels = labels[mask]\n        return accuracy(logits, labels)\n\n\ndef main(args):\n    # load and preprocess dataset\n    if args.dataset == 'cora':\n        data = CoraGraphDataset()\n    elif args.dataset == 'citeseer':\n        data = CiteseerGraphDataset()\n    elif args.dataset == 'pubmed':\n        data = PubmedGraphDataset()\n    else:\n        raise ValueError('Unknown dataset: {}'.format(args.dataset))\n\n    g = data[0]\n    if args.gpu < 0:\n        cuda = False\n    else:\n        cuda = True\n        g = g.int().to(args.gpu)\n\n    features = g.ndata['feat']\n    labels = g.ndata['label']\n    train_mask = g.ndata['train_mask']\n    val_mask = g.ndata['val_mask']\n    test_mask = g.ndata['test_mask']\n    num_feats = features.shape[1]\n    n_classes = data.num_labels\n    n_edges = data.graph.number_of_edges()\n    print(\"\"\"----Data statistics------'\n      #Edges %d\n      #Classes %d\n      #Train samples %d\n      #Val samples %d\n      #Test samples %d\"\"\" %\n          (n_edges, n_classes,\n           train_mask.int().sum().item(),\n           val_mask.int().sum().item(),\n           test_mask.int().sum().item()))\n\n    # add self loop\n    g = dgl.remove_self_loop(g)\n    g = dgl.add_self_loop(g)\n    n_edges = g.number_of_edges()\n    # create model\n    heads = ([args.num_heads] * (args.num_layers-1)) + [args.num_out_heads]\n    model = GAT(g,\n                args.num_layers,\n                num_feats,\n                args.num_hidden,\n                n_classes,\n                heads,\n                F.elu,\n                args.in_drop,\n                args.attn_drop,\n                args.negative_slope,\n                args.residual)\n    print(model)\n    if args.early_stop:\n        stopper = EarlyStopping(patience=100)\n    if cuda:\n        model.cuda()\n    loss_fcn = torch.nn.CrossEntropyLoss()\n\n    # use optimizer\n    optimizer = torch.optim.Adam(\n        model.parameters(), lr=args.lr, weight_decay=args.weight_decay)\n\n    # initialize graph\n    dur = []\n    for epoch in range(args.epochs):\n        model.train()\n        if epoch >= 3:\n            if cuda:\n                torch.cuda.synchronize()\n            t0 = time.time()\n        # forward\n        logits = model(features)\n        loss = loss_fcn(logits[train_mask], labels[train_mask])\n\n        optimizer.zero_grad()\n        loss.backward()\n        optimizer.step()\n\n        if epoch >= 3:\n            if cuda:\n                torch.cuda.synchronize()\n            dur.append(time.time() - t0)\n\n        train_acc = accuracy(logits[train_mask], labels[train_mask])\n\n        if args.fastmode:\n            val_acc = accuracy(logits[val_mask], labels[val_mask])\n        else:\n            val_acc = evaluate(model, features, labels, val_mask)\n            if args.early_stop:\n                if stopper.step(val_acc, model):\n                    break\n\n        print(\"Epoch {:05d} | Time(s) {:.4f} | Loss {:.4f} | TrainAcc {:.4f} |\"\n              \" ValAcc {:.4f} | ETputs(KTEPS) {:.2f}\".\n              format(epoch, np.mean(dur), loss.item(), train_acc,\n                     val_acc, n_edges / np.mean(dur) / 1000))\n\n    print()\n    if args.early_stop:\n        model.load_state_dict(torch.load('es_checkpoint.pt'))\n    acc = evaluate(model, features, labels, test_mask)\n    print(\"Test Accuracy {:.4f}\".format(acc))\n\n\nif __name__ == '__main__':\n\n    parser = argparse.ArgumentParser(description='GAT')\n    register_data_args(parser)\n    parser.add_argument(\"--gpu\", type=int, default=-1,\n                        help=\"which GPU to use. Set -1 to use CPU.\")\n    parser.add_argument(\"--epochs\", type=int, default=200,\n                        help=\"number of training epochs\")\n    parser.add_argument(\"--num-heads\", type=int, default=8,\n                        help=\"number of hidden attention heads\")\n    parser.add_argument(\"--num-out-heads\", type=int, default=1,\n                        help=\"number of output attention heads\")\n    parser.add_argument(\"--num-layers\", type=int, default=2,\n                        help=\"number of hidden layers\")\n    parser.add_argument(\"--num-hidden\", type=int, default=8,\n                        help=\"number of hidden units\")\n    parser.add_argument(\"--residual\", action=\"store_true\", default=False,\n                        help=\"use residual connection\")\n    parser.add_argument(\"--in-drop\", type=float, default=.6,\n                        help=\"input feature dropout\")\n    parser.add_argument(\"--attn-drop\", type=float, default=.6,\n                        help=\"attention dropout\")\n    parser.add_argument(\"--lr\", type=float, default=0.005,\n                        help=\"learning rate\")\n    parser.add_argument('--weight-decay', type=float, default=5e-4,\n                        help=\"weight decay\")\n    parser.add_argument('--negative-slope', type=float, default=0.2,\n                        help=\"the negative slope of leaky relu\")\n    parser.add_argument('--early-stop', action='store_true', default=False,\n                        help=\"indicates whether to use early stop or not\")\n    parser.add_argument('--fastmode', action=\"store_true\", default=False,\n                        help=\"skip re-evaluate the validation set\")\n    args = parser.parse_args()\n    print(args)\n\n    main(args)\n", "path": "examples/pytorch/gat/train.py"}]}