Skip to content
Snippets Groups Projects
Commit 147fecf9 authored by Chang-Uk Jeong's avatar Chang-Uk Jeong
Browse files

Update introduction.rst

parent bb23d87b
No related branches found
No related tags found
No related merge requests found
......@@ -231,19 +231,17 @@
data.test_mask.sum().item()
>>> 1000
This time, the :class:`~torch_geometric.data.Data` objects holds a label for each node, and additional node-level attributes: :obj:`train_mask`, :obj:`val_mask` and :obj:`test_mask`, where
이번에는, `~torch_geometric.data.Data` 클래스(class)의 객체에 각 노드의 레이블과 추가적인 노드 수준의 속성(attribute)인 `train_mask` , `val_mask` , `test_mask` 가 있습니다:
- `train_mask` 는 훈련할 노드(140개 노드)를 나타냅니다,
- `val_mask` 는 검증 단계(validation)에서, *예를 들어*, 조기 종료(early stopping)시키기 위해 사용할 노드(500개 노드)를 나타냅니다,
- `test_mask` 테스트할 노드(1000개 노드)를 나타냅니다.
- `test_mask` 테스트할 노드(1000개 노드)를 나타냅니다.
미니 배치(Mini-batches)
------------
Neural networks are usually trained in a batch-wise fashion.
신경망(Neural network)은 주로 배치 별 학습 방식을 사용합니다.
`PyG` 희소 블록 대각 인접 행렬(sparse block diagonal adjacency matrix, `edge_index`로 정의됨)을 만들고 노드의 차원으로 특징(feature)과 타겟 행렬을 결합(concatenate)해서 미니 배치를 활용한 병렬화를 가능하게 합니다.
`PyG` 희소 블록 대각 인접 행렬(sparse block diagonal adjacency matrix, `edge_index`로 정의됨)을 만들고 노드의 차원으로 특징(feature)과 타겟 행렬을 결합(concatenate)해서 미니 배치를 활용한 병렬화를 가능하게 합니다.
이 구성에 따라 예제마다 하나의 배치당 노드 개수와 엣지 개수를 다르게 가져갈 수 있습니다:
.. math::
......@@ -274,7 +272,7 @@ Neural networks are usually trained in a batch-wise fashion.
.. math::
\mathrm{batch} = {\begin{bmatrix} 0 & \cdots & 0 & 1 & \cdots & n - 2 & n -1 & \cdots & n - 1 \end{bmatrix}}^{\top}
$\mathrm{batch} = {\begin{bmatrix} 0 & \cdots & 0 & 1 & \cdots & n - 2 & n -1 & \cdots & n - 1 \end{bmatrix}}^{\top}$
이것은, 예를 들어 각 그래프에 속한 노드들의 특징(feature)을 노드 차원에서 평균화하는 데 사용할 수 있습니다:
......@@ -298,9 +296,7 @@ Neural networks are usually trained in a batch-wise fashion.
x.size()
>>> torch.Size([32, 21])
You can learn more about the internal batching procedure of :pyg:`PyG`, *e.g.*, how to modify its behavior, `here <../advanced/batching.html>`__.
`여기 <../advanced/batching.html>`__ 서 `PyG`의 내부 배치 처리 기법(예: 배치의 동작을 수정하는 방법)에 대해 더 자세히 알아볼 수 있습니다.
For documentation of scatter operations, we refer the interested reader to the :obj:`torch_scatter` `documentation <https://pytorch-scatter.readthedocs.io>`_.
scatter 연산에 대해 관심 있는 독자분들은 `torch_scatter` `documentation <https://pytorch-scatter.readthedocs.io>`_ 를 참조하시기 바랍니다.
Data Transforms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment