Again the same error, this was not the problem. Please revise again. 

torch.Size([20, 16, 3, 3]) torch.Size([2, 100]) torch.Size([100, 16])

---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Input In [40], in ()
 62 model = GNNClassifier(in\_channels, hidden\_channels, num\_classes)
 64 # Perform a forward pass with the random graph
---> 65 output = model(data)
 67 print(output)

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1130, in Module.\_call\_impl(self, \*input, \*\*kwargs)
 1126 # If we don't have any hooks, we want to skip the rest of the logic in
 1127 # this function, and just call forward.
 1128 if not (self.\_backward\_hooks or self.\_forward\_hooks or self.\_forward\_pre\_hooks or \_global\_backward\_hooks
 1129 or \_global\_forward\_hooks or \_global\_forward\_pre\_hooks):
-> 1130 return forward\_call(\*input, \*\*kwargs)
 1131 # Do not call functions when jit is used
 1132 full\_backward\_hooks, non\_full\_backward\_hooks = [], []

Input In [40], in GNNClassifier.forward(self, data)
 30 x, edge\_index, edge\_attr = data.x, data.edge\_index, data.edge\_attr
 31 print(x.shape, edge\_index.shape, edge\_attr.shape)
---> 32 x = self.gnn(x, edge\_index, edge\_attr)
 33 x = torch.relu(x)
 34 x = x.mean(dim=(2, 3)) # Global average pooling for image-like features

File /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1130, in Module.\_call\_impl(self, \*input, \*\*kwargs)
 1126 # If we don't have any hooks, we want to skip the rest of the logic in
 1127 # this function, and just call forward.
 1128 if not (self.\_backward\_hooks or self.\_forward\_hooks or self.\_forward\_pre\_hooks or \_global\_backward\_hooks
 1129 or \_global\_forward\_hooks or \_global\_forward\_pre\_hooks):
-> 1130 return forward\_call(\*input, \*\*kwargs)
 1131 # Do not call functions when jit is used
 1132 full\_backward\_hooks, non\_full\_backward\_hooks = [], []

Input In [40], in EdgeConv2DGCNConv.forward(self, x, edge\_index, edge\_attr)
 14 def forward(self, x, edge\_index, edge\_attr):
---> 15 return self.propagate(edge\_index, x=x, edge\_attr=edge\_attr)

File /opt/conda/lib/python3.10/site-packages/torch\_geometric/nn/conv/message\_passing.py:366, in MessagePassing.propagate(self, edge\_index, size, \*\*kwargs)
 363 for arg in decomp\_args:
 364 kwargs[arg] = decomp\_kwargs[arg][i]
--> 366 coll\_dict = self.\_\_collect\_\_(self.\_\_user\_args\_\_, edge\_index,
 367 size, kwargs)
 369 msg\_kwargs = self.inspector.distribute('message', coll\_dict)
 370 for hook in self.\_message\_forward\_pre\_hooks.values():

File /opt/conda/lib/python3.10/site-packages/torch\_geometric/nn/conv/message\_passing.py:260, in MessagePassing.\_\_collect\_\_(self, args, edge\_index, size, kwargs)
 258 if isinstance(data, Tensor):
 259 self.\_\_set\_size\_\_(size, dim, data)
--> 260 data = self.\_\_lift\_\_(data, edge\_index, dim)
 262 out[arg] = data
 264 if isinstance(edge\_index, Tensor):

File /opt/conda/lib/python3.10/site-packages/torch\_geometric/nn/conv/message\_passing.py:230, in MessagePassing.\_\_lift\_\_(self, src, edge\_index, dim)
 228 if isinstance(edge\_index, Tensor):
 229 index = edge\_index[dim]
--> 230 return src.index\_select(self.node\_dim, index)
 231 elif isinstance(edge\_index, SparseTensor):
 232 if dim == 1:

IndexError: index out of range in self
동일한 오류가 발생하면 문제가 아닙니다. 다시 수정하세요. 

torch.Size([20, 16, 3, 3]) torch.Size([2, 100]) torch.Size([100, 16])

---------------------------------------------------------------------------
인덱스 에러 트레이스백 (가장 최근 호출 마지막)
입력 In [40], in ()
 62 model = GNNClassifier(in\_채널, hidden\_채널, num\_classes)
 64 # 랜덤 그래프로 포워드 패스를 수행합니다.
---> 65 출력 = 모델(데이터)
 67 print(output)

파일 /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1130, in Module.\_call\_impl(self, \*input, \*\*kwargs)
 1126 # 후크가 없으면 나머지 로직은 건너뛰겠습니다.
 1127 # 이 함수의 나머지 로직을 건너뛰고 그냥 전달 호출합니다.
 1128 그렇지 않은 경우 (self.\_backward\_hooks 또는 self.\_forward\_hooks 또는 self.\_forward\_pre\_hooks 또는 \_global\_backward\_hooks
 1129 또는 \_글로벌\_포워드\_후크 또는 \_글로벌\_포워드\_프리\_후크):
-> 1130 return forward\_call(\*input, \*\*kwargs)
 1131 # jit 사용 시 함수 호출 금지
 1132 full\_backward\_hooks, non\_full\_backward\_hooks = [], []

입력 [40], in GNNClassifier.forward(self, data)
 30 x, edge\_index, edge\_attr = data.x, data.edge\_index, data.edge\_attr
 31 print(x.shape, edge\_index.shape, edge\_attr.shape)
---> 32 x = self.gnn(x, edge\_index, edge\_attr)
 33 x = torch.relu(x)
 34 x = x.mean(dim=(2, 3)) # 이미지와 유사한 피처에 대한 글로벌 평균 풀링

파일 /opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py:1130, in Module.\_call\_impl(self, \*input, \*\*kwargs)
 1126 # 후크가 없으면 나머지 로직은 건너뛰겠습니다.
 1127 # 이 함수의 나머지 로직을 건너뛰고 그냥 전달 호출합니다.
 1128 그렇지 않은 경우 (self.\_backward\_hooks 또는 self.\_forward\_hooks 또는 self.\_forward\_pre\_hooks 또는 \_global\_backward\_hooks
 1129 또는 \_글로벌\_포워드\_후크 또는 \_글로벌\_포워드\_프리\_후크):
-> 1130 return forward\_call(\*input, \*\*kwargs)
 1131 # jit 사용 시 함수 호출 금지
 1132 full\_backward\_hooks, non\_full\_backward\_hooks = [], []

입력 [40], in EdgeConv2DGCNConv.forward(self, x, edge\_index, edge\_attr)
 14 def forward(self, x, edge\_index, edge\_attr):
---> 15 return self.propagate(edge\_index, x=x, edge\_attr=edge\_attr)

파일 /opt/conda/lib/python3.10/site-packages/torch\_geometric/nn/conv/message\_passing.py:366, in MessagePassing.propagate(self, edge\_index, size, \*\*kwargs)
 363 decomp\_args의 arg에 대해:
 364 kwargs[arg] = decomp\_kwargs[arg][i]
--> 366 coll\_dict = self.\_\_collect\_\_(self.\_\_user\_args\_\_, edge\_index,
 367 크기, kwargs)
 369 msg\_kwargs = self.inspector.distribute('message', coll\_dict)
 370 self.\_message\_forward\_pre\_hooks.values()의 후크에 대해:

파일 /opt/conda/lib/python3.10/site-packages/torch\_geometric/nn/conv/message\_passing.py:260, in MessagePassing.\_\_collect\_\_(self, args, edge\_index, size, kwargs)
 258 if isinstance(데이터, 텐서):
 259 self.\_\_set\_size\_\_(size, dim, data)
--> 260 data = self.\_\_lift\_\_(data, edge\_index, dim)
 262 out[arg] = data
 264 if isinstance(edge\_index, Tensor):

파일 /opt/conda/lib/python3.10/site-packages/torch\_geometric/nn/conv/message\_passing.py:230, in MessagePassing.\_\_lift\_\_(self, src, edge\_index, dim)
 228 if isinstance(edge\_index, Tensor):
 229 index = edge\_index[dim]
--> 230 return src.index\_select(self.node\_dim, index)
 231 elif isinstance(edge\_index, SparseTensor):
 232 if dim == 1:

IndexError: 자체의 인덱스가 범위를 벗어났습니다.